more flink
This commit is contained in:
parent
deca0a82be
commit
20693f234e
|
@ -407,6 +407,7 @@ The JobManager then performs the job and, when finished, asserts (job-finished I
|
||||||
;; ID -> ...
|
;; ID -> ...
|
||||||
(define (assign-task [mngr : ID])
|
(define (assign-task [mngr : ID])
|
||||||
(start-facet this-facet
|
(start-facet this-facet
|
||||||
|
(assert (task-assignment mngr job-id t))
|
||||||
(on (retracted (task-manager mngr discard))
|
(on (retracted (task-manager mngr discard))
|
||||||
;; our task manager has crashed
|
;; our task manager has crashed
|
||||||
(stop this-facet (select-a-task-manager)))
|
(stop this-facet (select-a-task-manager)))
|
||||||
|
@ -417,19 +418,21 @@ The JobManager then performs the job and, when finished, asserts (job-finished I
|
||||||
#;(take-slot! mngr)
|
#;(take-slot! mngr)
|
||||||
(start-facet take-slot
|
(start-facet take-slot
|
||||||
(stop-when (asserted (task-state mngr job-id this-id discard))
|
(stop-when (asserted (task-state mngr job-id this-id discard))
|
||||||
(received-answer! mngr)))
|
(received-answer! mngr))))
|
||||||
#;(task-assigner t job-id mngr
|
(on (asserted (task-state mngr job-id this-id (bind status TaskStateDesc)))
|
||||||
(lambda ()
|
(match status
|
||||||
;; need to find a new task manager
|
[ACCEPTED #f]
|
||||||
;; don't think we need a release-slot! here, because if we've heard back from a task manager,
|
[RUNNING #f]
|
||||||
;; they should have told us a different slot count since we tried to give them work
|
[OVERLOAD/ts
|
||||||
(log "JM overloaded manager ~a with task ~a" mngr this-id)
|
;; need to find a new task manager
|
||||||
(stop-facet this-facet (select-a-task-manager)))
|
;; don't think we need a release-slot! here, because if we've heard back from a task manager,
|
||||||
(lambda (results)
|
;; they should have told us a different slot count since we tried to give them work
|
||||||
(log "JM receives the results of task ~a" this-id)
|
(log "JM overloaded manager ~a with task ~a" mngr this-id)
|
||||||
(stop-facet perform (k this-id results)))))))
|
(stop this-facet (select-a-task-manager))]
|
||||||
|
[(finished (bind results TaskResult))
|
||||||
|
(log "JM receives the results of task ~a" this-id)
|
||||||
|
(stop perform (k this-id results))]))))
|
||||||
|
|
||||||
(on start (select-a-task-manager))))
|
(on start (select-a-task-manager))))
|
||||||
|
|
||||||
#f))))
|
#f))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue