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

[OSPP] Spark RDD Reader for GraphScope #2103

Merged
merged 8 commits into from
Oct 31, 2022
Merged

[OSPP] Spark RDD Reader for GraphScope #2103

merged 8 commits into from
Oct 31, 2022

Conversation

Issac-Newton
Copy link
Contributor

@Issac-Newton Issac-Newton commented Sep 29, 2022

What do these changes do?

Using gRPC to transfer data in GraphX(RDD) to GraphScope

Related issue number

Fixes #1529

@welcome
Copy link

welcome bot commented Sep 29, 2022

Thanks for submitting your first pull request! You are awesome! 🤗
Please make sure you have signed the CLA, as this is a mandatory check before a PR being merged.
Welcome to the GraphScope community! 🎉 You can meet the community on DingTalk or Slack.

@CLAassistant
Copy link

CLAassistant commented Sep 29, 2022

CLA assistant check
All committers have signed the CLA.

@zhanglei1949 zhanglei1949 changed the title using grpc to transfer rdd [OSPP] Spark RDD Reader for GraphScope Sep 29, 2022
@zhanglei1949
Copy link
Collaborator

zhanglei1949 commented Oct 28, 2022

Hi, thank you for opening pull request for GraphScope! Could you please rebase your branch to main?

@zhanglei1949
Copy link
Collaborator

@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2022

Codecov Report

Merging #2103 (bd8ff48) into main (74af74f) will decrease coverage by 5.86%.
The diff coverage is n/a.

❗ Current head bd8ff48 differs from pull request most recent head 6d8e869. Consider uploading reports for the commit 6d8e869 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2103      +/-   ##
==========================================
- Coverage   72.93%   67.07%   -5.87%     
==========================================
  Files          89       89              
  Lines        9789     9789              
==========================================
- Hits         7140     6566     -574     
- Misses       2649     3223     +574     
Impacted Files Coverage Δ
...aphscope/tests/kubernetes/test_resource_builder.py 0.00% <0.00%> (-100.00%) ⬇️
...on/graphscope/tests/kubernetes/test_demo_script.py 0.00% <0.00%> (-91.75%) ⬇️
python/graphscope/deploy/kubernetes/utils.py 11.90% <0.00%> (-58.58%) ⬇️
python/graphscope/deploy/kubernetes/cluster.py 23.01% <0.00%> (-51.70%) ⬇️
...thon/graphscope/tests/kubernetes/test_with_mars.py 0.00% <0.00%> (-44.83%) ⬇️
...n/graphscope/deploy/kubernetes/resource_builder.py 30.52% <0.00%> (-26.32%) ⬇️
python/graphscope/interactive/query.py 71.95% <0.00%> (-17.08%) ⬇️
python/graphscope/client/rpc.py 77.09% <0.00%> (-9.17%) ⬇️
python/graphscope/tests/conftest.py 76.53% <0.00%> (-4.43%) ⬇️
python/graphscope/client/session.py 73.62% <0.00%> (-2.85%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25ab466...6d8e869. Read the comment docs.


int main()
{
MPI_Init(NULL, NULL);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use grape::CommSpec instead. Refer to any unit test under analytical_engine/test/

@@ -0,0 +1,296 @@
#include <iostream>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we extract the definition of rdd_transfer_client to a header file, for example, rdd_reader.h? And create a test file under analytical_engine/java/grape-rdd-reader/src/main/cpp/rdd_reader.cc. Also include your CMakeLists.txt under grape-rdd-reader.

@@ -0,0 +1,255 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rename this module to grape-rdd-reader, and include this module as a submodule of grape-jdk-parent.

<protoc.version>3.19.2</protoc.version>

<scala.version>2.13.8</scala.version>
<spark.version>3.2.1</spark.version>
Copy link
Collaborator

Choose a reason for hiding this comment

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

All these properties should be declared in parent pom, and should be consistent with current declared version.


<!-- required for jdk9 -->
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check this.

@@ -0,0 +1,238 @@
package RDDReaderTransfer;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please include license for every single file you added.



public class RDDReadServer {
//静态方法用于获取当前节点的ip
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please replace/remove all Chinese comments with english comments,

@Override
public void run() {
// Use stderr here since the logger may have been reset by its JVM shutdown hook.
System.err.println("*** shutting down gRPC server since JVM is shutting down");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please user Logger.error


private void stop() throws InterruptedException {
if (server != null) {
server.shutdown().awaitTermination(30, TimeUnit.SECONDS);
Copy link
Collaborator

Choose a reason for hiding this comment

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

The awaitTermination time should be confinable or at least declared as a constant in class. Avoid directly use the value.

@@ -0,0 +1,68 @@
package RDDReaderTransfer
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this is a unit test, move to src/test/scala

@@ -0,0 +1,218 @@
/** Copyright 2022 Alibaba Group Holding Limited.
Copy link
Collaborator

Choose a reason for hiding this comment

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

rename to rdd_reader_client.h?

@sighingnow sighingnow merged commit f4dea3e into alibaba:main Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphScope for GraphX : Reading RDD from Spark
5 participants