use of com.baidu.hugegraph.computer.core.receiver.message.ComputeMessageRecvPartitions in project hugegraph-computer by hugegraph.
the class MessageRecvManager method messagePartitions.
public Map<Integer, PeekableIterator<KvEntry>> messagePartitions() {
E.checkState(this.messagePartitions != null, "The messagePartitions can't be null");
ComputeMessageRecvPartitions partitions = this.messagePartitions;
this.messagePartitions = null;
return partitions.iterators();
}
use of com.baidu.hugegraph.computer.core.receiver.message.ComputeMessageRecvPartitions in project hugegraph-computer by hugegraph.
the class MessageRecvManager method beforeSuperstep.
@Override
public void beforeSuperstep(Config config, int superstep) {
SuperstepFileGenerator fileGenerator = new SuperstepFileGenerator(this.fileManager, superstep);
this.messagePartitions = new ComputeMessageRecvPartitions(this.context, fileGenerator, this.sortManager);
this.expectedFinishMessages = this.workerCount;
this.finishMessagesLatch = new CountDownLatch(this.expectedFinishMessages);
this.superstep = superstep;
if (this.superstep == Constants.INPUT_SUPERSTEP + 1) {
assert this.vertexPartitions != null;
this.vertexPartitions.clearOldFiles(Constants.INPUT_SUPERSTEP);
this.vertexPartitions = null;
assert this.edgePartitions != null;
this.edgePartitions.clearOldFiles(Constants.INPUT_SUPERSTEP);
this.edgePartitions = null;
}
}
Aggregations