Skip to content
Permalink
Browse files
Fix bug: last edge attched in currVertex missed to send (#80)
  • Loading branch information
Linary committed Aug 9, 2021
1 parent 94ee148 commit 54184492ab52e018dca6e4932848810fac75e332
Showing 1 changed file with 8 additions and 3 deletions.
@@ -157,6 +157,9 @@ public IteratorFromEdge() {

@Override
public boolean hasNext() {
if (InputSplit.END_SPLIT.equals(this.currentSplit)) {
return this.currentVertex != null;
}
EdgeFetcher edgeFetcher = fetcher.edgeFetcher();
while (this.currentSplit == null || !edgeFetcher.hasNext()) {
/*
@@ -165,7 +168,7 @@ public boolean hasNext() {
*/
this.currentSplit = fetcher.nextEdgeInputSplit();
if (this.currentSplit.equals(InputSplit.END_SPLIT)) {
return false;
return this.currentVertex != null;
}
edgeFetcher.prepareLoadInputSplit(this.currentSplit);
}
@@ -177,9 +180,11 @@ public Vertex next() {
if (!this.hasNext()) {
throw new NoSuchElementException();
}

com.baidu.hugegraph.structure.graph.Edge hugeEdge;
while (this.hasNext()) {
hugeEdge = fetcher.edgeFetcher().next();
EdgeFetcher edgeFetcher = fetcher.edgeFetcher();
while (edgeFetcher.hasNext()) {
hugeEdge = edgeFetcher.next();
Edge edge = this.convert(hugeEdge);
Id sourceId = HugeConverter.convertId(hugeEdge.sourceId());
if (this.currentVertex == null) {

0 comments on commit 5418449

Please sign in to comment.