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 2016/11/25 15:19:49 UTC

[10/11] mesos git commit: Cleaned up private members in HealthChecker class.

Cleaned up private members in HealthChecker class.

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


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

Branch: refs/heads/master
Commit: 906753b0ecc2afb156e4006b147f08ec7de3695b
Parents: 14b5e94
Author: Alexander Rukletsov <ru...@gmail.com>
Authored: Fri Nov 25 16:14:35 2016 +0100
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Fri Nov 25 16:14:35 2016 +0100

----------------------------------------------------------------------
 src/health-check/health_checker.cpp |  6 +++---
 src/health-check/health_checker.hpp | 15 +++++++++------
 2 files changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/906753b0/src/health-check/health_checker.cpp
----------------------------------------------------------------------
diff --git a/src/health-check/health_checker.cpp b/src/health-check/health_checker.cpp
index 7cdf5df..544c1d2 100644
--- a/src/health-check/health_checker.cpp
+++ b/src/health-check/health_checker.cpp
@@ -174,13 +174,13 @@ HealthCheckerProcess::HealthCheckerProcess(
     const vector<string>& _namespaces)
   : ProcessBase(process::ID::generate("health-checker")),
     check(_check),
-    healthUpdateCallback(_callback),
     launcherDir(_launcherDir),
-    initializing(true),
+    healthUpdateCallback(_callback),
     taskID(_taskID),
     taskPid(_taskPid),
     namespaces(_namespaces),
-    consecutiveFailures(0)
+    consecutiveFailures(0),
+    initializing(true)
 {
   Try<Duration> create = Duration::create(check.delay_seconds());
   CHECK_SOME(create);

http://git-wip-us.apache.org/repos/asf/mesos/blob/906753b0/src/health-check/health_checker.hpp
----------------------------------------------------------------------
diff --git a/src/health-check/health_checker.hpp b/src/health-check/health_checker.hpp
index 8d410a8..1230f96 100644
--- a/src/health-check/health_checker.hpp
+++ b/src/health-check/health_checker.hpp
@@ -135,15 +135,18 @@ private:
   Duration checkGracePeriod;
   Duration checkTimeout;
 
-  lambda::function<void(const TaskHealthStatus&)> healthUpdateCallback;
-  std::string launcherDir;
-  bool initializing;
-  TaskID taskID;
-  Option<pid_t> taskPid;
-  std::vector<std::string> namespaces;
+  // Contains a binary for TCP health checks.
+  const std::string launcherDir;
+
+  const lambda::function<void(const TaskHealthStatus&)> healthUpdateCallback;
+  const TaskID taskID;
+  const Option<pid_t> taskPid;
+  const std::vector<std::string> namespaces;
   Option<lambda::function<pid_t(const lambda::function<int()>&)>> clone;
+
   uint32_t consecutiveFailures;
   process::Time startTime;
+  bool initializing;
 };