-
Notifications
You must be signed in to change notification settings - Fork 92
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
feat: Introduce HugeGraphFlinkCDCLoader #291
Conversation
Codecov Report
@@ Coverage Diff @@
## master #291 +/- ##
============================================
+ Coverage 71.12% 72.90% +1.78%
- Complexity 877 1849 +972
============================================
Files 82 242 +160
Lines 3816 8084 +4268
Branches 456 716 +260
============================================
+ Hits 2714 5894 +3180
- Misses 898 1807 +909
- Partials 204 383 +179
Continue to review full report at Codecov.
|
There was a problem hiding this 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, some tiny comments
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphSinkFunction.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphSinkFunction.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphSinkFunction.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphSinkFunction.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphFlinkCDCLoader.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphFlinkCDCLoader.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphFlinkCDCLoader.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphDeserialization.java
Show resolved
Hide resolved
return; | ||
} | ||
loader.load(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added lines #L54 - L60 were not covered by tests
can we add some tests for this code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About test , I plan to introduce testcontainers
for doing e2e test, starting 3 containers for mysql, flink, hugegraph, for testing the correctness of the entire process (similar for sparkLoader). What do you think?
This may take some time, I will submit later or the next pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a good idea, let's do it the next pr
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/constant/Constants.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/constant/Constants.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphDeserialization.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphFlinkCDCLoader.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphFlinkCDCLoader.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphFlinkCDCLoader.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphFlinkCDCLoader.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphFlinkCDCLoader.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/spark/HugeGraphSparkLoader.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphFlinkCDCLoader.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/spark/HugeGraphSparkLoader.java
Outdated
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphOutputFormat.java
Show resolved
Hide resolved
hugegraph-loader/src/main/java/com/baidu/hugegraph/loader/flink/HugeGraphDeserialization.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -93,7 +93,7 @@ private MySqlSource<String> buildMysqlSource(InputStruct struct) { | |||
port = uriBuilder.getPort(); | |||
} catch (URISyntaxException e) { | |||
throw new IllegalArgumentException( | |||
String.format("Failed to parse Url(%s) to get hostName and port", url), e); | |||
String.format("Failed to parse url(%s) to get hostName and port", url), e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny: we can use hostname
closed #290
basic version of HugeGraphFlinkCDCLoader
The options are divided into two parts, flink options and hugegraph-loader options. (no sorting required)
Since the parameter abbreviations of hugegraph-loader and flink overlap, please use the full name of hugegraph options, like
--file
instead of-f
test cmd