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 2017/08/23 22:23:56 UTC

[13/13] mesos git commit: Marked Framework::hasTask in agent as const.

Marked Framework::hasTask in agent as const.

Review: https://reviews.apache.org/r/61648


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/12026b8b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/12026b8b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/12026b8b

Branch: refs/heads/master
Commit: 12026b8bf2322d4b64bb087bd8c3972972632de2
Parents: 10b2a45
Author: Benjamin Mahler <bm...@apache.org>
Authored: Fri Aug 4 16:32:03 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Wed Aug 23 15:09:45 2017 -0700

----------------------------------------------------------------------
 src/slave/slave.cpp | 4 ++--
 src/slave/slave.hpp | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/12026b8b/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index eab3617..6ee8187 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -7486,10 +7486,10 @@ void Framework::addPendingTaskGroup(
 }
 
 
-bool Framework::hasTask(const TaskID& taskId)
+bool Framework::hasTask(const TaskID& taskId) const
 {
   foreachkey (const ExecutorID& executorId, pendingTasks) {
-    if (pendingTasks[executorId].contains(taskId)) {
+    if (pendingTasks.at(executorId).contains(taskId)) {
       return true;
     }
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/12026b8b/src/slave/slave.hpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.hpp b/src/slave/slave.hpp
index 1f0e826..28fa671 100644
--- a/src/slave/slave.hpp
+++ b/src/slave/slave.hpp
@@ -892,7 +892,7 @@ public:
       const ExecutorID& executorId,
       const TaskGroupInfo& taskGroup);
 
-  bool hasTask(const TaskID& taskId);
+  bool hasTask(const TaskID& taskId) const;
   bool isPending(const TaskID& taskId) const;
 
   // Returns the task group associated with a pending task.