我學習Mesos代碼,成爲有關執行一個簡單的泊塢窗圖像的內部工作流程非常混亂,如下這樣 :Apache Mesos的Command Executor的調度程序是什麼?
mesos-execute --master=XXX \
--containerizer=docker \
--name=test \
--docker_image=XXX \
--shell=false
我相信/src/cli/execute.cpp
是這個「mesos - 執行」的執行情況,在官方文件中稱爲「Command Executor」。
我看到execute.cpp
內部設置了一個CommandScheduler
,它有一個void received(queue<Event> events)
函數來偵聽來自主設備的事件。如果它收到Event::OFFERS
,它將開始執行提供的資源(代理)上的任務的過程。
但是,我無法準確找到提供給客戶端可執行文件的資源。 我看到/src/master/master.cpp
中有void Master::offer(…)
函數。但它會發送一個ResourceOffersMessage
,而不是一個事件,也不會將事件轉換爲消息。 我發現只有/src/sched/sched.cpp
可以接收和處理這種類型的消息。但我不明白sched.cpp
如何用於其他代碼....
所以,我找不到發送提供的資源(從主)到Command Executor的確切工作流程。 這個Command Executor的調度程序是什麼? 有人能幫我理解嗎?
感謝
[[email protected]郵件列表上回答](https://lists.apache.org/thread.html/[email protected]%3Cuser.mesos.apache.org%3E) – janisz
和不同的重複問題[[email protected]郵件列表](https://lists.apache.org/thread.html/[email protected]%3Cdev.mesos.apache.org%3E) – janisz