use of com.baidu.hugegraph.computer.core.receiver.vertex.VertexMessageRecvPartitions in project hugegraph-computer by hugegraph.
the class MessageRecvManager method init.
@Override
public void init(Config config) {
SuperstepFileGenerator fileGenerator = new SuperstepFileGenerator(this.fileManager, Constants.INPUT_SUPERSTEP);
this.vertexPartitions = new VertexMessageRecvPartitions(this.context, fileGenerator, this.sortManager);
this.edgePartitions = new EdgeMessageRecvPartitions(this.context, fileGenerator, this.sortManager);
this.workerCount = config.get(ComputerOptions.JOB_WORKERS_COUNT);
// One for vertex and one for edge.
this.expectedFinishMessages = this.workerCount * 2;
this.finishMessagesLatch = new CountDownLatch(this.expectedFinishMessages);
this.waitFinishMessagesTimeout = config.get(ComputerOptions.WORKER_WAIT_FINISH_MESSAGES_TIMEOUT);
}
use of com.baidu.hugegraph.computer.core.receiver.vertex.VertexMessageRecvPartitions in project hugegraph-computer by hugegraph.
the class MessageRecvManager method vertexPartitions.
/**
* Get the Iterator<KeyStore.Entry> of each partition.
*/
public Map<Integer, PeekableIterator<KvEntry>> vertexPartitions() {
E.checkState(this.vertexPartitions != null, "The vertexPartitions can't be null");
VertexMessageRecvPartitions partitions = this.vertexPartitions;
return partitions.iterators();
}
Aggregations