-
Notifications
You must be signed in to change notification settings - Fork 41
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(core): support load vertex/edge snapshot #269
Conversation
9f9a73c
to
9a2fdb1
Compare
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.
nice enhancement
computer-core/src/main/java/org/apache/hugegraph/computer/core/snapshot/SnapshotManager.java
Outdated
Show resolved
Hide resolved
computer-core/src/main/java/org/apache/hugegraph/computer/core/snapshot/SnapshotManager.java
Outdated
Show resolved
Hide resolved
computer-core/src/main/java/org/apache/hugegraph/computer/core/snapshot/SnapshotManager.java
Outdated
Show resolved
Hide resolved
computer-core/src/main/java/org/apache/hugegraph/computer/core/snapshot/SnapshotManager.java
Outdated
Show resolved
Hide resolved
computer-core/src/main/java/org/apache/hugegraph/computer/core/snapshot/SnapshotManager.java
Outdated
Show resolved
Hide resolved
computer-core/src/main/java/org/apache/hugegraph/computer/core/snapshot/SnapshotManager.java
Outdated
Show resolved
Hide resolved
computer-core/src/main/java/org/apache/hugegraph/computer/core/snapshot/SnapshotManager.java
Outdated
Show resolved
Hide resolved
computer-core/src/main/java/org/apache/hugegraph/computer/core/snapshot/SnapshotManager.java
Outdated
Show resolved
Hide resolved
computer-core/src/main/java/org/apache/hugegraph/computer/core/snapshot/SnapshotManager.java
Outdated
Show resolved
Hide resolved
Hi @javeme , thanks for your comments, I will pay more attention at next time to write beautiful codes : ) |
75da7fc
to
8b6000c
Compare
8b6000c
to
6e1e444
Compare
computer-test/src/main/java/org/apache/hugegraph/computer/core/compute/ComputeManagerTest.java
Outdated
Show resolved
Hide resolved
computer-api/src/main/java/org/apache/hugegraph/computer/core/config/ComputerOptions.java
Outdated
Show resolved
Hide resolved
computer-api/src/main/java/org/apache/hugegraph/computer/core/config/ComputerOptions.java
Outdated
Show resolved
Hide resolved
...uter-test/src/main/java/org/apache/hugegraph/computer/core/compute/input/EdgesInputTest.java
Outdated
Show resolved
Hide resolved
public static final ConfigOption<String> SNAPSHOT_VIEW_KEY = | ||
new ConfigOption<>( | ||
"snapshot.view_key", | ||
"View key of target snapshot", |
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.
what does the view key mean? do we have a concept that is easier to understand?
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.
Maybe we can use SNAPSHOT_NAME
instead, just a user-defined unique identifier of the snapshot.
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.
Hi @javeme , I wanna make sure is there any other confusion about it before make changes.
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.
get it. SNAPSHOT_NAME seems easy to understand
computer-api/src/main/java/org/apache/hugegraph/computer/core/config/ComputerOptions.java
Outdated
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
Codecov Report
@@ Coverage Diff @@
## master #269 +/- ##
============================================
- Coverage 85.81% 85.15% -0.66%
- Complexity 3233 3248 +15
============================================
Files 344 345 +1
Lines 12115 12283 +168
Branches 1092 1101 +9
============================================
+ Hits 10396 10460 +64
- Misses 1195 1297 +102
- Partials 524 526 +2
... and 7 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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
for (int partitionId = 0; partitionId < this.partitionCount; partitionId++) { | ||
if (this.partitioner.workerId(partitionId) == id) { | ||
// TODO: Do not need to send control message to all workers | ||
this.sendManager.startSend(MessageType.VERTEX); |
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.
Why we need to send control message?
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.
We skip loadGraph()
step when using snapshot, if we don't send control message, next steps will not go on.
Purpose of the PR
Main Changes
SnapshotManager
to handle snapshot load and write.Verifying these changes
Trivial rework / code cleanup without any test coverage. (No Need)
Already covered by existing tests, such as (please modify tests here).
Need tests and can be verified as follows.
For my LOCAL test, I deploy MinIO in standalone mode first. Then I test all possible scenarios when using this feature. And here's my testing results:
当前无快照可读
当前有快照可读
In later PR, I will support to deploy MinIO as internal storage. Then, I will add UT to replace manual test results.
Later PR (Task)
Does this PR potentially affect the following parts?
Documentation Status
Doc - TODO
Doc - Done
Doc - No Need