Skip to content
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

fix: Spark with loader has dependency conflicts #480

Merged
merged 37 commits into from
Aug 7, 2023

Conversation

haohao0103
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the loader hugegraph-loader label Jun 14, 2023
@codecov
Copy link

codecov bot commented Jun 14, 2023

Codecov Report

Merging #480 (841e774) into master (549ca82) will decrease coverage by 0.07%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master     #480      +/-   ##
============================================
- Coverage     62.48%   62.42%   -0.07%     
+ Complexity     1868      895     -973     
============================================
  Files           260       91     -169     
  Lines          9432     4404    -5028     
  Branches        875      519     -356     
============================================
- Hits           5894     2749    -3145     
+ Misses         3154     1450    -1704     
+ Partials        384      205     -179     
Files Changed Coverage Δ
...e/hugegraph/loader/spark/HugeGraphSparkLoader.java 0.00% <0.00%> (ø)

... and 169 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

alanzhao added 4 commits June 14, 2023 14:07
Spark loader has dependency conflicts
Spark loader has dependency conflicts
Spark loader has dependency conflicts
Spark loader has dependency conflicts
@haohao0103
Copy link
Contributor Author

haohao0103 commented Jun 14, 2023

@imbajin @simon824 @JackyYangPassion Could you give me some advice? thanks.The error unittest I can pass in the local .
image
image

Copy link
Contributor

@javeme javeme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution~
Could you share some detailed context information? such as conflicting error messages.

hugegraph-loader/pom.xml Outdated Show resolved Hide resolved
hugegraph-loader/pom.xml Show resolved Hide resolved
@imbajin
Copy link
Member

imbajin commented Jun 14, 2023

@imbajin @simon824 @JackyYangPassion Could you give me some advice? thanks.The error unittest I can pass in the local . image image

could rebase/merge #478 first (will also fix the dependency-review problem)

@imbajin
Copy link
Member

imbajin commented Jun 18, 2023

@haohao0103 please update the branch with the latest code & fix the conflicts & then test the bug again

haohao0103 and others added 3 commits June 19, 2023 12:25
# Conflicts:
#	hugegraph-dist/scripts/dependency/known-dependencies.txt
#	hugegraph-loader/pom.xml
Spark loader has dependency conflicts
@imbajin imbajin requested a review from javeme June 19, 2023 07:35
alanzhao added 2 commits June 19, 2023 15:44
Spark loader has dependency conflicts
bypass server for hbase bulk delete massive vertices and edges
bypass server for hbase bulk delete massive vertices and edges
bypass server for hbase bulk delete massive vertices and edges
@liuxiaocs7
Copy link
Member

liuxiaocs7 commented Aug 1, 2023

Hi, @haohao0103, Wouldn it be better to separate the two things in different PRs?

@haohao0103
Copy link
Contributor Author

你好,@haohao0103,将两个东西分开放在不同的 PR 中会更好吗?

@liuxiaocs7 hi ,I have revert the last few commits and will deal with it after this pr merge.

remove incubating
imbajin
imbajin previously approved these changes Aug 2, 2023
@liuxiaocs7
Copy link
Member

Hi, @haohao0103, thanks for your work, but -1 for me.

I tested locally use ./bin/hugegraph-spark-loader.sh --master local[*] --name spark-hugegraph-loader --file ./example/spark/struct.json --host 192.168.34.164 --port 18080 --graph hugegraph

but got:

java.lang.NullPointerException
        at java.lang.String.split(String.java:2337)
        at java.lang.String.split(String.java:2422)

If I remember correctly, delimieter has a default comma, we need to check this?

elements = builder.build(fileSource.header(),
                         row.mkString(delimiter).split(delimiter));

Comment on lines +12 to +16
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
shaded.org.glassfish.jersey.client.JerseyClientBuilder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a question, why do I need to add SPI to these two classes (this one and below), it seems to be able to import normally without adding these two?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello, I understand that it is because SPI added these two classes in jersey-client jar and other jars. When we do shade, we are actually changing the path information of these two classes, so we need to add SPI to these two shade classes.

@haohao0103
Copy link
Contributor Author

Hi, @haohao0103, thanks for your work, but -1 for me.

I tested locally use ./bin/hugegraph-spark-loader.sh --master local[*] --name spark-hugegraph-loader --file ./example/spark/struct.json --host 192.168.34.164 --port 18080 --graph hugegraph

but got:

java.lang.NullPointerException
        at java.lang.String.split(String.java:2337)
        at java.lang.String.split(String.java:2422)

If I remember correctly, delimieter has a default comma, we need to check this?

elements = builder.build(fileSource.header(),
                         row.mkString(delimiter).split(delimiter));

hi,i have check it .when file format is json the default delimiter is null。
image

fix delimiter is null
Comment on lines +297 to +299
if (Optional.ofNullable(delimiter).isPresent()) {
elements = builder.build(fileSource.header(),
row.mkString(delimiter).split(delimiter));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liuxiaocs7 could test it again?

Copy link
Member

@liuxiaocs7 liuxiaocs7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@imbajin imbajin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we lack the test for spark-ci indeed, so next time could add some basic UT for it?

@simon824 simon824 merged commit 0ea28fd into apache:master Aug 7, 2023
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file loader hugegraph-loader
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants