Class Bsp4Master
- java.lang.Object
-
- org.apache.hugegraph.computer.core.bsp.BspBase
-
- org.apache.hugegraph.computer.core.bsp.Bsp4Master
-
public class Bsp4Master extends BspBase
-
-
Constructor Summary
Constructors Constructor Description Bsp4Master(org.apache.hugegraph.computer.core.config.Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmasterInitDone(ContainerInfo masterInfo)Register Master, workers can get master information.voidmasterInputDone()The master signal workers the master input done, the workers can merge vertices and edges after receive this signal.voidmasterResumeDone(int superstep)The master determines which superstep to start fromvoidmasterStepComputeDone(int superstep)Master signals the workers that the all workers compute done.voidmasterStepDone(int superstep, SuperstepStat superstepStat)Master signals the workers that superstep done.voidmasterStepPrepareDone(int superstep)Master signals the workers that the master superstep prepare-done.voidwaitWorkersCloseDone()Wait workers close the managers and exit first.java.util.List<ContainerInfo>waitWorkersInitDone()Wait workers registered.voidwaitWorkersInputDone()Wait all workers read input splits, and send all vertices and edges to correspond workers.voidwaitWorkersOutputDone()Wait workers output the vertices.voidwaitWorkersStepComputeDone(int superstep)Wait all workers finish computation of specified superstep.java.util.List<WorkerStat>waitWorkersStepDone(int superstep)Wait workers finish specified superstep.voidwaitWorkersStepPrepareDone(int superstep)After all workers prepared superstep, master prepare superstep, and call masterPrepareSuperstepDone to let the workers know that master is prepared done.-
Methods inherited from class org.apache.hugegraph.computer.core.bsp.BspBase
barrierOnMasterTimeout, barrierOnWorkersTimeout, bspClient, clean, close, constructPath, logInterval, registerTimeout, workerCount
-
-
-
-
Method Detail
-
masterInitDone
public void masterInitDone(ContainerInfo masterInfo)
Register Master, workers can get master information.
-
waitWorkersInitDone
public java.util.List<ContainerInfo> waitWorkersInitDone()
Wait workers registered.
-
masterResumeDone
public void masterResumeDone(int superstep)
The master determines which superstep to start from
-
waitWorkersInputDone
public void waitWorkersInputDone()
Wait all workers read input splits, and send all vertices and edges to correspond workers. After this, master call masterInputDone.
-
masterInputDone
public void masterInputDone()
The master signal workers the master input done, the workers can merge vertices and edges after receive this signal.
-
waitWorkersStepDone
public java.util.List<WorkerStat> waitWorkersStepDone(int superstep)
Wait workers finish specified superstep. The master receives the worker stat from all workers, calls algorithm's master computation, check the max iteration count, and then calls masterSuperstepDone to synchronize superstep result.
-
waitWorkersStepPrepareDone
public void waitWorkersStepPrepareDone(int superstep)
After all workers prepared superstep, master prepare superstep, and call masterPrepareSuperstepDone to let the workers know that master is prepared done.
-
masterStepPrepareDone
public void masterStepPrepareDone(int superstep)
Master signals the workers that the master superstep prepare-done.
-
waitWorkersStepComputeDone
public void waitWorkersStepComputeDone(int superstep)
Wait all workers finish computation of specified superstep.
-
masterStepComputeDone
public void masterStepComputeDone(int superstep)
Master signals the workers that the all workers compute done.
-
masterStepDone
public void masterStepDone(int superstep, SuperstepStat superstepStat)Master signals the workers that superstep done. The workers read GraphStat and determines whether to continue iteration.
-
waitWorkersOutputDone
public void waitWorkersOutputDone()
Wait workers output the vertices.
-
waitWorkersCloseDone
public void waitWorkersCloseDone()
Wait workers close the managers and exit first.
-
-