You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ya...@apache.org on 2017/07/31 20:33:32 UTC
mesos git commit: Convert resource format for completed frameworks.
Repository: mesos
Updated Branches:
refs/heads/master 6887bdcd4 -> dbe1fbcba
Convert resource format for completed frameworks.
This patch is similar to 4ec820709. We need to convert all resources
from old agents without reservation-refinement capability, including
task resources from completed frameworks.
Review: https://reviews.apache.org/r/61193
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/dbe1fbcb
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/dbe1fbcb
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/dbe1fbcb
Branch: refs/heads/master
Commit: dbe1fbcba21a2419616f9632b599bb43161ae042
Parents: 6887bdc
Author: Jiang Yan Xu <xu...@apple.com>
Authored: Wed Jul 26 16:15:15 2017 -0700
Committer: Jiang Yan Xu <xu...@apple.com>
Committed: Mon Jul 31 13:32:50 2017 -0700
----------------------------------------------------------------------
src/master/master.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/dbe1fbcb/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index dbf5dac..43cb697 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -6261,7 +6261,7 @@ void Master::__reregisterSlave(
const vector<ExecutorInfo>& executorInfos_,
const vector<Task>& tasks_,
const vector<FrameworkInfo>& frameworks,
- const vector<Archive::Framework>& completedFrameworks,
+ const vector<Archive::Framework>& completedFrameworks_,
const string& version,
const vector<SlaveInfo::Capability>& agentCapabilities,
const Future<bool>& readmit)
@@ -6312,6 +6312,7 @@ void Master::__reregisterSlave(
protobuf::slave::Capabilities slaveCapabilities(agentCapabilities);
vector<Task> tasks = tasks_;
vector<ExecutorInfo> executorInfos = executorInfos_;
+ vector<Archive::Framework> completedFrameworks = completedFrameworks_;
// If the agent is not multi-role capable, inject allocation info.
if (!slaveCapabilities.multiRole) {
@@ -6355,6 +6356,14 @@ void Master::__reregisterSlave(
convertResourceFormat(
executor.mutable_resources(), POST_RESERVATION_REFINEMENT);
}
+
+ foreach (Archive::Framework& completedFramework,
+ completedFrameworks) {
+ foreach (Task& task, *completedFramework.mutable_tasks()) {
+ convertResourceFormat(
+ task.mutable_resources(), POST_RESERVATION_REFINEMENT);
+ }
+ }
}
MachineID machineId;