You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2017/02/08 15:04:57 UTC

mesos git commit: Improved style in `HealthChecker`.

Repository: mesos
Updated Branches:
  refs/heads/master 948466912 -> 64863a573


Improved style in `HealthChecker`.

Marked `_taskPid` in the constructor as const,
to be consistent with the other parameters.

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


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

Branch: refs/heads/master
Commit: 64863a573caf72510db367e3df0b12a5a235647f
Parents: 9484669
Author: Gast�n Kleiman <ga...@gmail.com>
Authored: Wed Feb 8 16:02:24 2017 +0100
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Feb 8 16:02:24 2017 +0100

----------------------------------------------------------------------
 src/checks/health_checker.cpp | 6 +++---
 src/checks/health_checker.hpp | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/64863a57/src/checks/health_checker.cpp
----------------------------------------------------------------------
diff --git a/src/checks/health_checker.cpp b/src/checks/health_checker.cpp
index 58380dc..a5225ff 100644
--- a/src/checks/health_checker.cpp
+++ b/src/checks/health_checker.cpp
@@ -94,7 +94,7 @@ static const string DEFAULT_DOMAIN = "127.0.0.1";
 // general solution for entring namespace in child processes, see MESOS-6184.
 pid_t cloneWithSetns(
     const lambda::function<int()>& func,
-    Option<pid_t> taskPid,
+    const Option<pid_t>& taskPid,
     const vector<string>& namespaces)
 {
   return process::defaultClone([=]() -> int {
@@ -124,7 +124,7 @@ Try<Owned<HealthChecker>> HealthChecker::create(
     const string& launcherDir,
     const lambda::function<void(const TaskHealthStatus&)>& callback,
     const TaskID& taskId,
-    Option<pid_t> taskPid,
+    const Option<pid_t>& taskPid,
     const vector<string>& namespaces)
 {
   // Validate the 'HealthCheck' protobuf.
@@ -173,7 +173,7 @@ HealthCheckerProcess::HealthCheckerProcess(
     const string& _launcherDir,
     const lambda::function<void(const TaskHealthStatus&)>& _callback,
     const TaskID& _taskId,
-    Option<pid_t> _taskPid,
+    const Option<pid_t>& _taskPid,
     const vector<string>& _namespaces)
   : ProcessBase(process::ID::generate("health-checker")),
     check(_check),

http://git-wip-us.apache.org/repos/asf/mesos/blob/64863a57/src/checks/health_checker.hpp
----------------------------------------------------------------------
diff --git a/src/checks/health_checker.hpp b/src/checks/health_checker.hpp
index 95da1ff..b60666b 100644
--- a/src/checks/health_checker.hpp
+++ b/src/checks/health_checker.hpp
@@ -70,7 +70,7 @@ public:
       const std::string& launcherDir,
       const lambda::function<void(const TaskHealthStatus&)>& callback,
       const TaskID& taskId,
-      Option<pid_t> taskPid,
+      const Option<pid_t>& taskPid,
       const std::vector<std::string>& namespaces);
 
   ~HealthChecker();
@@ -95,7 +95,7 @@ public:
       const std::string& _launcherDir,
       const lambda::function<void(const TaskHealthStatus&)>& _callback,
       const TaskID& _taskId,
-      Option<pid_t> _taskPid,
+      const Option<pid_t>& _taskPid,
       const std::vector<std::string>& _namespaces);
 
   virtual ~HealthCheckerProcess() {}