You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2014/09/03 23:52:38 UTC
[5/5] git commit: Fixed a bug in the staging tasks metric.
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 <bm...@twitter.com>
Authored: Mon Aug 18 17:39:12 2014 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
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;