Repository: mesos Updated Branches: refs/heads/master 0a07725c6 -> 92b360532
Removed the logic in scheduler driver to set missing TaskInfo.executor.framework_id. This is no longer needed because master sets it. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/92b36053 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/92b36053 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/92b36053 Branch: refs/heads/master Commit: 92b360532062dff917bc037dc78470936fa176b6 Parents: 0a07725 Author: Vinod Kone <[email protected]> Authored: Thu Jul 16 19:43:43 2015 -0700 Committer: Vinod Kone <[email protected]> Committed: Thu Jul 16 19:43:43 2015 -0700 ---------------------------------------------------------------------- src/sched/sched.cpp | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/92b36053/src/sched/sched.cpp ---------------------------------------------------------------------- diff --git a/src/sched/sched.cpp b/src/sched/sched.cpp index 839fcbf..de76803 100644 --- a/src/sched/sched.cpp +++ b/src/sched/sched.cpp @@ -1080,17 +1080,6 @@ protected: return; } - // Set TaskInfo.executor.framework_id, if it's missing. - // TODO(ijimenez): Remove this validation in 0.24.0. - vector<TaskInfo> result; - foreach (TaskInfo task, tasks) { - if (task.has_executor() && !task.executor().has_framework_id()) { - task.mutable_executor()->mutable_framework_id()->CopyFrom( - framework.id()); - } - result.push_back(task); - } - LaunchTasksMessage message; message.mutable_framework_id()->MergeFrom(framework.id()); message.mutable_filters()->MergeFrom(filters); @@ -1098,7 +1087,7 @@ protected: foreach (const OfferID& offerId, offerIds) { message.add_offer_ids()->MergeFrom(offerId); - foreach (const TaskInfo& task, result) { + foreach (const TaskInfo& task, tasks) { // Keep only the slave PIDs where we run tasks so we can send // framework messages directly. if (savedOffers.contains(offerId)) { @@ -1118,7 +1107,7 @@ protected: savedOffers.erase(offerId); } - foreach (const TaskInfo& task, result) { + foreach (const TaskInfo& task, tasks) { message.add_tasks()->MergeFrom(task); } @@ -1172,20 +1161,6 @@ protected: foreach (const Offer::Operation& _operation, operations) { Offer::Operation* operation = accept->add_operations(); operation->CopyFrom(_operation); - - if (operation->type() != Offer::Operation::LAUNCH) { - continue; - } - - // Set TaskInfo.executor.framework_id, if it's missing. - // TODO(ijimenez): Remove this validation in 0.24.0. - foreach (TaskInfo& task, - *operation->mutable_launch()->mutable_task_infos()) { - if (task.has_executor() && !task.executor().has_framework_id()) { - task.mutable_executor()->mutable_framework_id()->CopyFrom( - framework.id()); - } - } } // Setting accept.offer_ids.
