You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2016/08/10 18:28:57 UTC

[5/5] mesos git commit: Minor cleanups to the command executor.

Minor cleanups to the command executor.

This change does a few minor cleanups:
- Renamed `taskID` -> `taskId`
- Renamed `taskId` argument to `_taskId` to avoid confusion
with the member variable `taskId`.

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


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

Branch: refs/heads/master
Commit: 5a17f4044914838363bdd26215d61ba3781d5ddc
Parents: 00709d0
Author: Anand Mazumdar <an...@apache.org>
Authored: Wed Aug 10 11:04:18 2016 -0700
Committer: Anand Mazumdar <an...@apache.org>
Committed: Wed Aug 10 11:04:18 2016 -0700

----------------------------------------------------------------------
 src/launcher/executor.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5a17f404/src/launcher/executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/executor.cpp b/src/launcher/executor.cpp
index 1dfe9a4..7967684 100644
--- a/src/launcher/executor.cpp
+++ b/src/launcher/executor.cpp
@@ -276,18 +276,18 @@ protected:
   }
 
   void taskHealthUpdated(
-      const TaskID& taskID,
+      const TaskID& _taskId,
       const bool healthy,
       const bool initiateTaskKill)
   {
     cout << "Received task health update, healthy: "
          << stringify(healthy) << endl;
 
-    update(taskID, TASK_RUNNING, healthy);
+    update(_taskId, TASK_RUNNING, healthy);
 
     if (initiateTaskKill) {
       killedByHealthCheck = true;
-      kill(taskID);
+      kill(_taskId);
     }
   }
 
@@ -440,7 +440,7 @@ protected:
     launched = true;
   }
 
-  void kill(const TaskID& taskId, const Option<KillPolicy>& override = None())
+  void kill(const TaskID& _taskId, const Option<KillPolicy>& override = None())
   {
     // Default grace period is set to 3s for backwards compatibility.
     //
@@ -456,10 +456,10 @@ protected:
       gracePeriod = Nanoseconds(killPolicy->grace_period().nanoseconds());
     }
 
-    cout << "Received kill for task " << taskId.value()
+    cout << "Received kill for task " << _taskId.value()
          << " with grace period of " << gracePeriod << endl;
 
-    kill(taskId, gracePeriod);
+    kill(_taskId, gracePeriod);
   }
 
   void shutdown()
@@ -672,7 +672,7 @@ private:
   }
 
   void update(
-      const TaskID& taskID,
+      const TaskID& _taskId,
       const TaskState& state,
       const Option<bool>& healthy = None(),
       const Option<string>& message = None())
@@ -680,7 +680,7 @@ private:
     UUID uuid = UUID::random();
 
     TaskStatus status;
-    status.mutable_task_id()->CopyFrom(taskID);
+    status.mutable_task_id()->CopyFrom(_taskId);
     status.mutable_executor_id()->CopyFrom(executorId);
 
     status.set_state(state);