Renamed resource offer timeout for clarity.

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


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

Branch: refs/heads/master
Commit: 79e149e3c4f7f0f61502a39fdb120b8fb9aa30be
Parents: afe3a1e
Author: Alexander Rukletsov <[email protected]>
Authored: Fri Jan 22 00:02:53 2016 -0800
Committer: Benjamin Mahler <[email protected]>
Committed: Fri Jan 22 00:02:53 2016 -0800

----------------------------------------------------------------------
 src/master/allocator/mesos/hierarchical.cpp | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/79e149e3/src/master/allocator/mesos/hierarchical.cpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/hierarchical.cpp 
b/src/master/allocator/mesos/hierarchical.cpp
index 2f40801..e4aef5b 100644
--- a/src/master/allocator/mesos/hierarchical.cpp
+++ b/src/master/allocator/mesos/hierarchical.cpp
@@ -899,28 +899,28 @@ void HierarchicalAllocatorProcess::recoverResources(
   }
 
   // Create a refused resources filter.
-  Try<Duration> seconds = Duration::create(filters.get().refuse_seconds());
+  Try<Duration> timeout = Duration::create(filters.get().refuse_seconds());
 
-  if (seconds.isError()) {
+  if (timeout.isError()) {
     LOG(WARNING) << "Using the default value of 'refuse_seconds' to create "
                  << "the refused resources filter because the input value "
-                 << "is invalid: " << seconds.error();
+                 << "is invalid: " << timeout.error();
 
-    seconds = Duration::create(Filters().refuse_seconds());
-  } else if (seconds.get() < Duration::zero()) {
+    timeout = Duration::create(Filters().refuse_seconds());
+  } else if (timeout.get() < Duration::zero()) {
     LOG(WARNING) << "Using the default value of 'refuse_seconds' to create "
                  << "the refused resources filter because the input value "
                  << "is negative";
 
-    seconds = Duration::create(Filters().refuse_seconds());
+    timeout = Duration::create(Filters().refuse_seconds());
   }
 
-  CHECK_SOME(seconds);
+  CHECK_SOME(timeout);
 
-  if (seconds.get() != Duration::zero()) {
+  if (timeout.get() != Duration::zero()) {
     VLOG(1) << "Framework " << frameworkId
             << " filtered slave " << slaveId
-            << " for " << seconds.get();
+            << " for " << timeout.get();
 
     // Create a new filter.
     OfferFilter* offerFilter = new RefusedOfferFilter(resources);
@@ -940,9 +940,9 @@ void HierarchicalAllocatorProcess::recoverResources(
     //
     // TODO(alexr): If we allocated upon resource recovery
     // (MESOS-3078), we would not need to increase the timeout here.
-    Duration timeout = std::max(allocationInterval, seconds.get());
+    timeout = std::max(allocationInterval, timeout.get());
 
-    delay(timeout,
+    delay(timeout.get(),
           self(),
           expireOffer,
           frameworkId,

Reply via email to