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

feat(core): support load vertex/edge snapshot #269

Merged
merged 6 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.apache.hugegraph.computer.core.receiver.MessageRecvManager;
import org.apache.hugegraph.computer.core.receiver.ReceiverUtil;
import org.apache.hugegraph.computer.core.sender.MessageSendManager;
import org.apache.hugegraph.computer.core.snapshot.SnapshotManager;
import org.apache.hugegraph.computer.core.sort.sorting.SendSortManager;
import org.apache.hugegraph.computer.core.sort.sorting.SortManager;
import org.apache.hugegraph.computer.core.store.FileManager;
Expand Down Expand Up @@ -104,6 +105,11 @@ public void setup() {
fileManager,
sortManager);
this.managers.add(receiveManager);
SnapshotManager snapshotManager = new SnapshotManager(context(),
null,
Radeity marked this conversation as resolved.
Show resolved Hide resolved
receiveManager,
null);
this.managers.add(snapshotManager);
this.managers.initAll(this.config);
this.connectionId = new ConnectionId(new InetSocketAddress("localhost",
8081),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import org.apache.hugegraph.computer.core.receiver.MessageRecvManager;
import org.apache.hugegraph.computer.core.receiver.ReceiverUtil;
import org.apache.hugegraph.computer.core.sender.MessageSendManager;
import org.apache.hugegraph.computer.core.snapshot.SnapshotManager;
import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator;
import org.apache.hugegraph.computer.core.sort.sorting.SendSortManager;
import org.apache.hugegraph.computer.core.sort.sorting.SortManager;
Expand Down Expand Up @@ -137,6 +138,11 @@ private void testEdgeFreq(EdgeFrequency freq)
fileManager,
sortManager);
this.managers.add(receiveManager);
SnapshotManager snapshotManager = new SnapshotManager(context(),
null,
Radeity marked this conversation as resolved.
Show resolved Hide resolved
receiveManager,
null);
this.managers.add(snapshotManager);
this.managers.initAll(this.config);
ConnectionId connectionId = new ConnectionId(new InetSocketAddress(
"localhost", 8081),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.apache.hugegraph.computer.core.network.message.MessageType;
import org.apache.hugegraph.computer.core.receiver.MessageRecvManager;
import org.apache.hugegraph.computer.core.receiver.ReceiverUtil;
import org.apache.hugegraph.computer.core.snapshot.SnapshotManager;
import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator;
import org.apache.hugegraph.computer.core.sort.sorting.RecvSortManager;
import org.apache.hugegraph.computer.core.sort.sorting.SortManager;
Expand Down Expand Up @@ -90,6 +91,11 @@ public void setup() {
fileManager,
sortManager);
this.managers.add(receiveManager);
SnapshotManager snapshotManager = new SnapshotManager(context(),
null,
receiveManager,
null);
this.managers.add(snapshotManager);
this.managers.initAll(this.config);
this.connectionId = new ConnectionId(new InetSocketAddress("localhost",
8081),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.hugegraph.computer.core.network.connection.ConnectionManager;
import org.apache.hugegraph.computer.core.network.connection.TransportConnectionManager;
import org.apache.hugegraph.computer.core.receiver.MessageRecvManager;
import org.apache.hugegraph.computer.core.snapshot.SnapshotManager;
import org.apache.hugegraph.computer.core.sort.sorting.RecvSortManager;
import org.apache.hugegraph.computer.core.sort.sorting.SortManager;
import org.apache.hugegraph.computer.core.store.FileManager;
Expand Down Expand Up @@ -55,6 +56,10 @@ public void test() {
MessageRecvManager recvManager = new MessageRecvManager(context(),
fileManager,
sortManager);
SnapshotManager snapshotManager = new SnapshotManager(context(),
null,
recvManager,
null);
recvManager.init(config);
ConnectionManager connManager = new TransportConnectionManager();
DataServerManager serverManager = new DataServerManager(connManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.apache.hugegraph.computer.core.receiver.edge.EdgeMessageRecvPartitionTest;
import org.apache.hugegraph.computer.core.receiver.message.ComputeMessageRecvPartitionTest;
import org.apache.hugegraph.computer.core.receiver.vertex.VertexMessageRecvPartitionTest;
import org.apache.hugegraph.computer.core.snapshot.SnapshotManager;
import org.apache.hugegraph.computer.core.sort.flusher.PeekableIterator;
import org.apache.hugegraph.computer.core.sort.sorting.RecvSortManager;
import org.apache.hugegraph.computer.core.sort.sorting.SortManager;
Expand All @@ -49,6 +50,7 @@ public class MessageRecvManagerTest extends UnitTestBase {
private FileManager fileManager;
private SortManager sortManager;
private MessageRecvManager receiveManager;
private SnapshotManager snapshotManager;
private ConnectionId connectionId;

@Before
Expand All @@ -73,6 +75,10 @@ public void setup() {
this.receiveManager = new MessageRecvManager(context(),
this.fileManager,
this.sortManager);
this.snapshotManager = new SnapshotManager(context(),
null,
receiveManager,
null);
this.receiveManager.init(this.config);
this.connectionId = new ConnectionId(
new InetSocketAddress("localhost",8081),
Expand Down
Loading