Class Bsp4Worker
- java.lang.Object
-
- org.apache.hugegraph.computer.core.bsp.BspBase
-
- org.apache.hugegraph.computer.core.bsp.Bsp4Worker
-
public class Bsp4Worker extends BspBase
-
-
Constructor Summary
Constructors Constructor Description Bsp4Worker(org.apache.hugegraph.computer.core.config.Config config, ContainerInfo workerInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ContainerInfo>waitMasterAllInitDone()Get all workers information includes hostname and port the workers listen on.ContainerInfowaitMasterInitDone()Wait master registered, get master's information includes hostname and port.voidwaitMasterInputDone()Wait master signal that all workers input done.intwaitMasterResumeDone()The master set this signal to let workers knows the first superstep to start with.voidwaitMasterStepComputeDone(int superstep)After receive this signal, it indicates that all workers have computed vertices for the superstep.SuperstepStatwaitMasterStepDone(int superstep)The master set this signal after all workers signaled superstepDone, and master computes MasterComputation, and broadcast all aggregators to works.voidwaitMasterStepPrepareDone(int superstep)After receive this signal, the worker can execute and send messages to other workers.voidworkerCloseDone()Worker set this signal to indicate the worker has stopped the managers and will successfully exit.voidworkerInitDone()Register this worker, worker's information is passed by constructor.voidworkerInputDone()Set read done signal after read input splits, and send all vertices and edges to correspond workers.voidworkerOutputDone()Worker set this signal to indicate the worker has outputted the result.voidworkerStepComputeDone(int superstep)Worker set this signal to indicate the worker has computed the vertices for specified superstep.voidworkerStepDone(int superstep, WorkerStat workerStat)Worker set this signal after sent all messages to corresponding workers and sent aggregators to master.voidworkerStepPrepareDone(int superstep)Worker set this signal to indicate the worker is ready to receive messages from other workers.-
Methods inherited from class org.apache.hugegraph.computer.core.bsp.BspBase
barrierOnMasterTimeout, barrierOnWorkersTimeout, bspClient, clean, close, constructPath, logInterval, registerTimeout, workerCount
-
-
-
-
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.
-
-