use of com.baidu.hugegraph.computer.core.graph.SuperstepStat in project hugegraph-computer by hugegraph.
the class MasterService method inputstep.
/**
* Coordinate with workers to load vertices and edges from HugeGraph. There
* are two phases in inputstep. First phase is get input splits from
* master, and read the vertices and edges from input splits. The second
* phase is after all workers read input splits, the workers merge the
* vertices and edges to get the stats for each partition.
*/
private SuperstepStat inputstep() {
LOG.info("{} MasterService inputstep started", this);
this.bsp4Master.waitWorkersInputDone();
this.bsp4Master.masterInputDone();
List<WorkerStat> workerStats = this.bsp4Master.waitWorkersStepDone(Constants.INPUT_SUPERSTEP);
SuperstepStat superstepStat = SuperstepStat.from(workerStats);
this.bsp4Master.masterStepDone(Constants.INPUT_SUPERSTEP, superstepStat);
LOG.info("{} MasterService inputstep finished with superstat {}", this, superstepStat);
return superstepStat;
}
Aggregations