Class Bsp4Worker


  • public class Bsp4Worker
    extends BspBase
    • Constructor Detail

      • Bsp4Worker

        public Bsp4Worker​(org.apache.hugegraph.computer.core.config.Config config,
                          ContainerInfo workerInfo)
    • Method Detail

      • waitMasterInitDone

        public ContainerInfo waitMasterInitDone()
        Wait master registered, get master's information includes hostname and port.
      • workerInitDone

        public void workerInitDone()
        Register this worker, worker's information is passed by constructor.
      • waitMasterAllInitDone

        public java.util.List<ContainerInfo> waitMasterAllInitDone()
        Get all workers information includes hostname and port the workers listen on.
      • waitMasterResumeDone

        public int waitMasterResumeDone()
        The master set this signal to let workers knows the first superstep to start with.
      • workerInputDone

        public void workerInputDone()
        Set read done signal after read input splits, and send all vertices and edges to correspond workers.
      • waitMasterInputDone

        public void waitMasterInputDone()
        Wait master signal that all workers input done. After this, worker can merge the vertices and edges.
      • workerStepPrepareDone

        public void workerStepPrepareDone​(int superstep)
        Worker set this signal to indicate the worker is ready to receive messages from other workers.
      • waitMasterStepPrepareDone

        public void waitMasterStepPrepareDone​(int superstep)
        After receive this signal, the worker can execute and send messages to other workers.
      • workerStepComputeDone

        public void workerStepComputeDone​(int superstep)
        Worker set this signal to indicate the worker has computed the vertices for specified superstep.
      • waitMasterStepComputeDone

        public void waitMasterStepComputeDone​(int superstep)
        After receive this signal, it indicates that all workers have computed vertices for the superstep. The worker can calls after-superstep callback of managers.
      • workerStepDone

        public void workerStepDone​(int superstep,
                                   WorkerStat workerStat)
        Worker set this signal after sent all messages to corresponding workers and sent aggregators to master.
      • waitMasterStepDone

        public SuperstepStat waitMasterStepDone​(int superstep)
        The master set this signal after all workers signaled superstepDone, and master computes MasterComputation, and broadcast all aggregators to works.
      • workerOutputDone

        public void workerOutputDone()
        Worker set this signal to indicate the worker has outputted the result.
      • workerCloseDone

        public void workerCloseDone()
        Worker set this signal to indicate the worker has stopped the managers and will successfully exit.