The role of the runJobToCompletion method is to execute all stages of the graph's state machine until either the job completes or an error occurs.
As you can see in the following code snippet, we request from the executor instance to run the graph algorithm until its termination condition is met. Then, the worker reports its success to the master by joining the barrier for the EXECUTED_GRAPH step.
Once all other workers reach the barrier, the master unblocks us and we proceed to invoke the CompleteJob method on the user-provided job.Runner instance. Then, we notify the master that the calculations have been stored by joining the barrier for the PERSISTED_RESULTS step.
After the ...