Updates to Mesos for Timer::create/cancel -> Clock::timer/cancel.

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


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

Branch: refs/heads/master
Commit: 788a136f3a43a32ce64f7b2ef35a1005f2528dbd
Parents: 303ee1c
Author: Benjamin Hindman <[email protected]>
Authored: Sun Nov 2 20:23:01 2014 -0800
Committer: Benjamin Hindman <[email protected]>
Committed: Sat Nov 15 16:25:57 2014 -0800

----------------------------------------------------------------------
 src/launcher/executor.cpp | 2 +-
 src/log/catchup.cpp       | 2 +-
 src/master/master.cpp     | 4 ++--
 src/slave/gc.cpp          | 2 +-
 src/slave/slave.cpp       | 6 +++---
 src/zookeeper/group.cpp   | 4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/788a136f/src/launcher/executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/executor.cpp b/src/launcher/executor.cpp
index cbc8750..6175bf5 100644
--- a/src/launcher/executor.cpp
+++ b/src/launcher/executor.cpp
@@ -378,7 +378,7 @@ private:
     TaskState state;
     string message;
 
-    Timer::cancel(escalationTimer);
+    Clock::cancel(escalationTimer);
 
     if (!status_.isReady()) {
       state = TASK_FAILED;

http://git-wip-us.apache.org/repos/asf/mesos/blob/788a136f/src/log/catchup.cpp
----------------------------------------------------------------------
diff --git a/src/log/catchup.cpp b/src/log/catchup.cpp
index 6315a85..f7afc38 100644
--- a/src/log/catchup.cpp
+++ b/src/log/catchup.cpp
@@ -238,7 +238,7 @@ private:
       .onFailed(defer(self(), &Self::failed))
       .onReady(defer(self(), &Self::succeeded));
 
-    Timer::create(timeout, lambda::bind(&Self::timedout, catching));
+    Clock::timer(timeout, lambda::bind(&Self::timedout, catching));
   }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/788a136f/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 83c2f8a..b5fa8d1 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -773,7 +773,7 @@ void Master::finalize()
   // TODO(vinod): This seems to be a bug in libprocess or the
   // testing infrastructure.
   if (slaves.recoveredTimer.isSome()) {
-    Timer::cancel(slaves.recoveredTimer.get());
+    Clock::cancel(slaves.recoveredTimer.get());
   }
 
   terminate(whitelistWatcher);
@@ -4829,7 +4829,7 @@ void Master::removeOffer(Offer* offer, bool rescind)
   // Remove and cancel offer removal timers. Canceling the Timers is
   // only done to avoid having too many active Timers in libprocess.
   if (offerTimers.contains(offer->id())) {
-    Timer::cancel(offerTimers[offer->id()]);
+    Clock::cancel(offerTimers[offer->id()]);
     offerTimers.erase(offer->id());
   }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/788a136f/src/slave/gc.cpp
----------------------------------------------------------------------
diff --git a/src/slave/gc.cpp b/src/slave/gc.cpp
index 73136dd..6042277 100644
--- a/src/slave/gc.cpp
+++ b/src/slave/gc.cpp
@@ -113,7 +113,7 @@ bool GarbageCollectorProcess::unschedule(const string& path)
 // existing timer.
 void GarbageCollectorProcess::reset()
 {
-  Timer::cancel(timer); // Cancel the existing timer, if any.
+  Clock::cancel(timer); // Cancel the existing timer, if any.
   if (!paths.empty()) {
     Timeout removalTime = (*paths.begin()).first; // Get the first entry.
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/788a136f/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 275081c..06b2e18 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -795,7 +795,7 @@ void Slave::registered(const UPID& from, const SlaveID& 
slaveId)
       // If we don't get a ping from the master, trigger a
       // re-registration. This needs to be done once registered,
       // in case we never receive an initial ping.
-      Timer::cancel(pingTimer);
+      Clock::cancel(pingTimer);
 
       pingTimer = delay(
           MASTER_PING_TIMEOUT(),
@@ -2577,7 +2577,7 @@ void Slave::pingOld(const UPID& from, const string& body)
   // longer considers the slave to be registered, so it is
   // essential for the slave to attempt a re-registration
   // when this occurs.
-  Timer::cancel(pingTimer);
+  Clock::cancel(pingTimer);
 
   pingTimer = delay(
       MASTER_PING_TIMEOUT(),
@@ -2609,7 +2609,7 @@ void Slave::ping(const UPID& from, bool connected)
   // longer considers the slave to be registered, so it is
   // essential for the slave to attempt a re-registration
   // when this occurs.
-  Timer::cancel(pingTimer);
+  Clock::cancel(pingTimer);
 
   pingTimer = delay(
       MASTER_PING_TIMEOUT(),

http://git-wip-us.apache.org/repos/asf/mesos/blob/788a136f/src/zookeeper/group.cpp
----------------------------------------------------------------------
diff --git a/src/zookeeper/group.cpp b/src/zookeeper/group.cpp
index 7dee0a1..173caa8 100644
--- a/src/zookeeper/group.cpp
+++ b/src/zookeeper/group.cpp
@@ -332,7 +332,7 @@ void GroupProcess::connected(int64_t sessionId, bool 
reconnect)
 
   // Cancel and cleanup the reconnect timer (if necessary).
   if (timer.isSome()) {
-    Timer::cancel(timer.get());
+    Clock::cancel(timer.get());
     timer = None();
   }
 
@@ -476,7 +476,7 @@ void GroupProcess::expired(int64_t sessionId)
 
   // Cancel and cleanup the reconnect timer (if necessary).
   if (timer.isSome()) {
-    Timer::cancel(timer.get());
+    Clock::cancel(timer.get());
     timer = None();
   }
 

Reply via email to