Class Bsp4Master


  • public class Bsp4Master
    extends BspBase
    • Constructor Detail

      • Bsp4Master

        public Bsp4Master​(org.apache.hugegraph.computer.core.config.Config config)
    • 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.