Skip to content

Commit

Permalink
Apply review comment
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Junghanns <[email protected]>
  • Loading branch information
FlorentinD and s1ck committed Jul 10, 2024
1 parent c8e4043 commit 3508303
Showing 1 changed file with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
import org.neo4j.gds.api.GraphStore;
import org.neo4j.gds.compat.Neo4jProxy;
import org.neo4j.gds.compat.Write;
import org.neo4j.gds.core.concurrency.DefaultPool;
import org.neo4j.gds.core.concurrency.RunWithConcurrency;
import org.neo4j.gds.core.utils.partition.DegreePartition;
import org.neo4j.gds.core.utils.partition.PartitionUtils;
import org.neo4j.gds.core.utils.progress.tasks.ProgressTracker;
Expand All @@ -37,7 +35,6 @@
import org.neo4j.gds.utils.StatementApi;

import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.function.LongUnaryOperator;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -100,16 +97,9 @@ public void write(

progressTracker.beginSubTask();
try {
RunWithConcurrency
.builder()
.concurrency(RelationshipExporterBuilder.TYPED_DEFAULT_WRITE_CONCURRENCY)
.tasks(tasks)
.maxWaitRetries(Integer.MAX_VALUE)
.waitTime(10L, TimeUnit.MICROSECONDS)
.terminationFlag(terminationFlag)
.executor(DefaultPool.INSTANCE)
.mayInterruptIfRunning(false)
.run();
for (Runnable task : tasks) {
task.run();
}
} finally {
progressTracker.endSubTask();
}
Expand All @@ -132,7 +122,6 @@ private Runnable createBatchRunnable(
partition.consume(nodeId -> {
relationshipIterator.forEachRelationship(nodeId, writeConsumer);
});

});
}

Expand Down

0 comments on commit 3508303

Please sign in to comment.