January 2020
Intermediate to advanced
640 pages
16h 56m
English
Once the master node creates a new masterJobCoordinator instance, it invokes its RunJob method to kick off the execution of the job. Since the method is a bit lengthy, we will break it down into a set of smaller blocks:
execFactory := newMasterExecutorFactory(c.cfg.serializer, c.barrier) executor, err := c.cfg.jobRunner.StartJob(c.cfg.jobDetails, execFactory) if err != nil { c.cancelJobCtx() return xerrors.Errorf("unable to start job on master: %w", err) } for assignedPartition, w := range c.cfg.workers { w.SetDisconnectCallback(c.handleWorkerDisconnect) if err := c.publishJobDetails(w, assignedPartition); err != nil { c.cfg.jobRunner.AbortJob(c.cfg.jobDetails) c.cancelJobCtx() return err } }
The first two lines in the ...