Radeity commented on code in PR #248:
URL: 
https://github.com/apache/incubator-hugegraph-computer/pull/248#discussion_r1207974472


##########
computer-core/src/main/java/org/apache/hugegraph/computer/core/worker/load/LoadService.java:
##########
@@ -78,30 +67,38 @@ public void rpcService(InputSplitRpcService rpcService) {
     }
 
     public Iterator<Vertex> createIteratorFromVertex() {
-        return new IteratorFromVertex();
+        return new IteratorFromVertex(this.config, this.rpcService);
     }
 
     public Iterator<Vertex> createIteratorFromEdge() {
-        return new IteratorFromEdge();
+        return new IteratorFromEdge(this.config, this.rpcService);
     }
 
-    private class IteratorFromVertex implements Iterator<Vertex> {
+    private class IteratorFromVertex implements Iterator<Vertex>, 
AutoCloseable {
 
         private InputSplit currentSplit;
 
-        public IteratorFromVertex() {
+        /*
+         * GraphFetcher include:
+         *   VertexFetcher vertexFetcher;
+         *   EdgeFetcher edgeFetcher;
+         */
+        private GraphFetcher fetcher;
+
+        public IteratorFromVertex(Config config, InputSplitRpcService 
rpcService) {

Review Comment:
   It seems that we can't, `fetcher` has property `localBatch`, different 
thread can not share the same `localBatch`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to