Fixed a bug in the staging tasks metric. Review: https://reviews.apache.org/r/25303
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/789d9b4e Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/789d9b4e Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/789d9b4e Branch: refs/heads/master Commit: 789d9b4e8838b5cf3d3c730d5648c5346a20d1fd Parents: aa95ca5 Author: Benjamin Mahler <[email protected]> Authored: Mon Aug 18 17:39:12 2014 -0700 Committer: Benjamin Mahler <[email protected]> Committed: Wed Sep 3 14:01:16 2014 -0700 ---------------------------------------------------------------------- src/slave/slave.cpp | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/789d9b4e/src/slave/slave.cpp ---------------------------------------------------------------------- diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp index 235e9ed..a4027ec 100644 --- a/src/slave/slave.cpp +++ b/src/slave/slave.cpp @@ -3337,6 +3337,12 @@ double Slave::_tasks_staging() foreachvalue (Executor* executor, framework->executors) { count += executor->queuedTasks.size(); + + foreach (Task* task, executor->launchedTasks.values()) { + if (task->state() == TASK_STAGING) { + count++; + } + } } } return count;
