You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2015/09/21 21:27:57 UTC

[1/4] mesos git commit: Updated QUIESCE to SUPPRESS in Mesos Call.

Repository: mesos
Updated Branches:
  refs/heads/master cfecd7fd7 -> a2e740d36


Updated QUIESCE to SUPPRESS in Mesos Call.

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


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

Branch: refs/heads/master
Commit: 705d6b57cf75373051fb7428aca00861fcca0b7b
Parents: cfecd7f
Author: Guangya Liu <gy...@gmail.com>
Authored: Mon Sep 21 12:03:55 2015 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Sep 21 12:03:55 2015 -0700

----------------------------------------------------------------------
 include/mesos/scheduler/scheduler.proto    | 2 +-
 include/mesos/v1/scheduler/scheduler.proto | 2 +-
 src/master/http.cpp                        | 2 +-
 src/master/master.cpp                      | 4 ++--
 src/master/validation.cpp                  | 2 +-
 src/sched/sched.cpp                        | 2 +-
 src/tests/scheduler_tests.cpp              | 2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/705d6b57/include/mesos/scheduler/scheduler.proto
----------------------------------------------------------------------
diff --git a/include/mesos/scheduler/scheduler.proto b/include/mesos/scheduler/scheduler.proto
index 89ddc10..06ddd48 100644
--- a/include/mesos/scheduler/scheduler.proto
+++ b/include/mesos/scheduler/scheduler.proto
@@ -174,7 +174,7 @@ message Call {
     RECONCILE = 9;   // See 'Reconcile' below.
     MESSAGE = 10;    // See 'Message' below.
     REQUEST = 11;    // See 'Request' below.
-    QUIESCE = 12;    // Inform master to stop sending offers to the framework.
+    SUPPRESS = 12;    // Inform master to stop sending offers to the framework.
 
     // TODO(benh): Consider adding an 'ACTIVATE' and 'DEACTIVATE' for
     // already subscribed frameworks as a way of stopping offers from

http://git-wip-us.apache.org/repos/asf/mesos/blob/705d6b57/include/mesos/v1/scheduler/scheduler.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/scheduler/scheduler.proto b/include/mesos/v1/scheduler/scheduler.proto
index bc19b8d..871c2ef 100644
--- a/include/mesos/v1/scheduler/scheduler.proto
+++ b/include/mesos/v1/scheduler/scheduler.proto
@@ -174,7 +174,7 @@ message Call {
     RECONCILE = 9;   // See 'Reconcile' below.
     MESSAGE = 10;    // See 'Message' below.
     REQUEST = 11;    // See 'Request' below.
-    QUIESCE = 12;    // Inform master to stop sending offers to the framework.
+    SUPPRESS = 12;    // Inform master to stop sending offers to the framework.
 
     // TODO(benh): Consider adding an 'ACTIVATE' and 'DEACTIVATE' for
     // already subscribed frameworks as a way of stopping offers from

http://git-wip-us.apache.org/repos/asf/mesos/blob/705d6b57/src/master/http.cpp
----------------------------------------------------------------------
diff --git a/src/master/http.cpp b/src/master/http.cpp
index 607d8e1..6c3f7d8 100644
--- a/src/master/http.cpp
+++ b/src/master/http.cpp
@@ -482,7 +482,7 @@ Future<Response> Master::Http::scheduler(const Request& request) const
       master->revive(framework);
       return Accepted();
 
-    case scheduler::Call::QUIESCE:
+    case scheduler::Call::SUPPRESS:
       master->quiesce(framework);
       return Accepted();
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/705d6b57/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 6c0db21..6582555 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -1781,7 +1781,7 @@ void Master::receive(
       request(framework, call.request());
       break;
 
-    case scheduler::Call::QUIESCE:
+    case scheduler::Call::SUPPRESS:
       quiesce(framework);
       break;
 
@@ -2623,7 +2623,7 @@ void Master::quiesce(Framework* framework)
 {
   CHECK_NOTNULL(framework);
 
-  LOG(INFO) << "Processing QUIESCE call for framework " << *framework;
+  LOG(INFO) << "Processing SUPPRESS call for framework " << *framework;
 
   ++metrics->messages_quiesce_offers;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/705d6b57/src/master/validation.cpp
----------------------------------------------------------------------
diff --git a/src/master/validation.cpp b/src/master/validation.cpp
index 0f3fc1a..9c7c8c1 100644
--- a/src/master/validation.cpp
+++ b/src/master/validation.cpp
@@ -97,7 +97,7 @@ Option<Error> validate(const mesos::scheduler::Call& call)
     case mesos::scheduler::Call::REVIVE:
       return None();
 
-    case mesos::scheduler::Call::QUIESCE:
+    case mesos::scheduler::Call::SUPPRESS:
       return None();
 
     case mesos::scheduler::Call::KILL:

http://git-wip-us.apache.org/repos/asf/mesos/blob/705d6b57/src/sched/sched.cpp
----------------------------------------------------------------------
diff --git a/src/sched/sched.cpp b/src/sched/sched.cpp
index 84c2edb..1d5eeea 100644
--- a/src/sched/sched.cpp
+++ b/src/sched/sched.cpp
@@ -1253,7 +1253,7 @@ protected:
 
     CHECK(framework.has_id());
     call.mutable_framework_id()->CopyFrom(framework.id());
-    call.set_type(Call::QUIESCE);
+    call.set_type(Call::SUPPRESS);
 
     CHECK_SOME(master);
     send(master.get().pid(), call);

http://git-wip-us.apache.org/repos/asf/mesos/blob/705d6b57/src/tests/scheduler_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/scheduler_tests.cpp b/src/tests/scheduler_tests.cpp
index 0f892f9..3d4806f 100644
--- a/src/tests/scheduler_tests.cpp
+++ b/src/tests/scheduler_tests.cpp
@@ -1013,7 +1013,7 @@ TEST_P(SchedulerTest, Quiesce)
   {
     Call call;
     call.mutable_framework_id()->CopyFrom(id);
-    call.set_type(Call::QUIESCE);
+    call.set_type(Call::SUPPRESS);
 
     mesos.send(call);
   }


[2/4] mesos git commit: Changed quiesceOffers to SuppressOffers.

Posted by vi...@apache.org.
Changed quiesceOffers to SuppressOffers.

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


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

Branch: refs/heads/master
Commit: 10ac36a15dad689bfc60741a8389aea2b55a8760
Parents: 705d6b5
Author: Guangya Liu <gy...@gmail.com>
Authored: Mon Sep 21 12:04:29 2015 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Sep 21 12:07:56 2015 -0700

----------------------------------------------------------------------
 include/mesos/master/allocator.hpp                |  2 +-
 include/mesos/scheduler.hpp                       |  4 ++--
 .../jni/org_apache_mesos_MesosSchedulerDriver.cpp |  6 +++---
 .../org/apache/mesos/MesosSchedulerDriver.java    |  2 +-
 .../src/org/apache/mesos/SchedulerDriver.java     |  2 +-
 src/master/allocator/mesos/allocator.hpp          |  8 ++++----
 src/master/allocator/mesos/hierarchical.hpp       | 18 +++++++++---------
 src/master/master.cpp                             |  4 ++--
 src/master/metrics.cpp                            |  8 ++++----
 src/master/metrics.hpp                            |  2 +-
 .../interface/src/mesos/interface/__init__.py     |  2 +-
 .../mesos/native/mesos_scheduler_driver_impl.cpp  | 11 ++++++-----
 .../mesos/native/mesos_scheduler_driver_impl.hpp  |  2 +-
 src/sched/sched.cpp                               |  8 ++++----
 src/tests/master_tests.cpp                        |  2 +-
 src/tests/mesos.hpp                               | 12 ++++++------
 src/tests/metrics_tests.cpp                       |  2 +-
 src/tests/scheduler_tests.cpp                     |  9 ++++-----
 18 files changed, 52 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/include/mesos/master/allocator.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/master/allocator.hpp b/include/mesos/master/allocator.hpp
index 3fea47f..2fd00ca 100644
--- a/include/mesos/master/allocator.hpp
+++ b/include/mesos/master/allocator.hpp
@@ -177,7 +177,7 @@ public:
       const FrameworkID& frameworkId) = 0;
 
   // Informs the allocator to stop sending resources for the framework
-  virtual void quiesceOffers(
+  virtual void suppressOffers(
       const FrameworkID& frameworkId) = 0;
 };
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/include/mesos/scheduler.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/scheduler.hpp b/include/mesos/scheduler.hpp
index 071f448..f571d42 100644
--- a/include/mesos/scheduler.hpp
+++ b/include/mesos/scheduler.hpp
@@ -270,7 +270,7 @@ public:
 
   // Inform Mesos master to stop sending offers to the framework. The
   // scheduler should call reviveOffers() to resume getting offers.
-  virtual Status quiesceOffers() = 0;
+  virtual Status suppressOffers() = 0;
 
   // Acknowledges the status update. This should only be called
   // once the status update is processed durably by the scheduler.
@@ -420,7 +420,7 @@ public:
 
   virtual Status reviveOffers();
 
-  virtual Status quiesceOffers();
+  virtual Status suppressOffers();
 
   virtual Status acknowledgeStatusUpdate(
       const TaskStatus& status);

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp
----------------------------------------------------------------------
diff --git a/src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp b/src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp
index d8acc4f..4d64ae3 100644
--- a/src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp
+++ b/src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp
@@ -988,10 +988,10 @@ JNIEXPORT jobject JNICALL Java_org_apache_mesos_MesosSchedulerDriver_reviveOffer
 
 /*
  * Class:     org_apache_mesos_MesosSchedulerDriver
- * Method:    quiesceOffers
+ * Method:    suppressOffers
  * Signature: ()Lorg/apache/mesos/Protos/Status;
  */
-JNIEXPORT jobject JNICALL Java_org_apache_mesos_MesosSchedulerDriver_quiesceOffers
+JNIEXPORT jobject JNICALL Java_org_apache_mesos_MesosSchedulerDriver_suppressOffers
   (JNIEnv* env, jobject thiz)
 {
   jclass clazz = env->GetObjectClass(thiz);
@@ -1000,7 +1000,7 @@ JNIEXPORT jobject JNICALL Java_org_apache_mesos_MesosSchedulerDriver_quiesceOffe
   MesosSchedulerDriver* driver =
     (MesosSchedulerDriver*) env->GetLongField(thiz, __driver);
 
-  Status status = driver->quiesceOffers();
+  Status status = driver->suppressOffers();
 
   return convert<Status>(env, status);
 }

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/java/src/org/apache/mesos/MesosSchedulerDriver.java
----------------------------------------------------------------------
diff --git a/src/java/src/org/apache/mesos/MesosSchedulerDriver.java b/src/java/src/org/apache/mesos/MesosSchedulerDriver.java
index de88463..07bdd4b 100644
--- a/src/java/src/org/apache/mesos/MesosSchedulerDriver.java
+++ b/src/java/src/org/apache/mesos/MesosSchedulerDriver.java
@@ -288,7 +288,7 @@ public class MesosSchedulerDriver implements SchedulerDriver {
 
   public native Status reviveOffers();
 
-  public native Status quiesceOffers();
+  public native Status suppressOffers();
 
   public native Status acknowledgeStatusUpdate(TaskStatus status);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/java/src/org/apache/mesos/SchedulerDriver.java
----------------------------------------------------------------------
diff --git a/src/java/src/org/apache/mesos/SchedulerDriver.java b/src/java/src/org/apache/mesos/SchedulerDriver.java
index ba4bc58..efe71b0 100644
--- a/src/java/src/org/apache/mesos/SchedulerDriver.java
+++ b/src/java/src/org/apache/mesos/SchedulerDriver.java
@@ -258,7 +258,7 @@ public interface SchedulerDriver {
    *
    * @see Status
    */
-  Status quiesceOffers();
+  Status suppressOffers();
 
   /**
    * Acknowledges the status update. This should only be called

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/master/allocator/mesos/allocator.hpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/allocator.hpp b/src/master/allocator/mesos/allocator.hpp
index 904dc62..dca2565 100644
--- a/src/master/allocator/mesos/allocator.hpp
+++ b/src/master/allocator/mesos/allocator.hpp
@@ -129,7 +129,7 @@ public:
       const Resources& resources,
       const Option<Filters>& filters);
 
-  void quiesceOffers(
+  void suppressOffers(
       const FrameworkID& frameworkId);
 
   void reviveOffers(
@@ -238,7 +238,7 @@ public:
       const Resources& resources,
       const Option<Filters>& filters) = 0;
 
-  virtual void quiesceOffers(
+  virtual void suppressOffers(
       const FrameworkID& frameworkId) = 0;
 
   virtual void reviveOffers(
@@ -523,12 +523,12 @@ inline void MesosAllocator<AllocatorProcess>::recoverResources(
 
 
 template <typename AllocatorProcess>
-inline void MesosAllocator<AllocatorProcess>::quiesceOffers(
+inline void MesosAllocator<AllocatorProcess>::suppressOffers(
     const FrameworkID& frameworkId)
 {
   process::dispatch(
       process,
-      &MesosAllocatorProcess::quiesceOffers,
+      &MesosAllocatorProcess::suppressOffers,
       frameworkId);
 }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/master/allocator/mesos/hierarchical.hpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/hierarchical.hpp b/src/master/allocator/mesos/hierarchical.hpp
index d3496bc..4ec08fd 100644
--- a/src/master/allocator/mesos/hierarchical.hpp
+++ b/src/master/allocator/mesos/hierarchical.hpp
@@ -167,7 +167,7 @@ public:
       const Resources& resources,
       const Option<Filters>& filters);
 
-  void quiesceOffers(
+  void suppressOffers(
       const FrameworkID& frameworkId);
 
   void reviveOffers(
@@ -258,8 +258,8 @@ protected:
     std::string role;
     bool checkpoint;  // Whether the framework desires checkpointing.
 
-    // Whether the framework quiesces resources.
-    bool quiesced;
+    // Whether the framework suppresses offers.
+    bool suppressed;
 
     // Whether the framework desires revocable resources.
     bool revocable;
@@ -506,7 +506,7 @@ HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::addFramework(
     }
   }
 
-  frameworks[frameworkId].quiesced = false;
+  frameworks[frameworkId].suppressed = false;
 
   LOG(INFO) << "Added framework " << frameworkId;
 
@@ -1141,11 +1141,11 @@ HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::recoverResources(
 
 template <class RoleSorter, class FrameworkSorter>
 void
-HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::quiesceOffers(
+HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::suppressOffers(
     const FrameworkID& frameworkId)
 {
   CHECK(initialized);
-  frameworks[frameworkId].quiesced = true;
+  frameworks[frameworkId].suppressed = true;
 }
 
 
@@ -1158,7 +1158,7 @@ HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::reviveOffers(
 
   frameworks[frameworkId].offerFilters.clear();
   frameworks[frameworkId].inverseOfferFilters.clear();
-  frameworks[frameworkId].quiesced = false;
+  frameworks[frameworkId].suppressed = false;
 
   // We delete each actual `OfferFilter` when
   // `HierarchicalAllocatorProcess::expire` gets invoked. If we delete the
@@ -1248,8 +1248,8 @@ HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::allocate(
         FrameworkID frameworkId;
         frameworkId.set_value(frameworkId_);
 
-        // If the framework has quiesced, ignore.
-        if (frameworks[frameworkId].quiesced) {
+        // If the framework has suppressed offers, ignore.
+        if (frameworks[frameworkId].suppressed) {
           continue;
         }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 6582555..d4a3fb1 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -2625,9 +2625,9 @@ void Master::quiesce(Framework* framework)
 
   LOG(INFO) << "Processing SUPPRESS call for framework " << *framework;
 
-  ++metrics->messages_quiesce_offers;
+  ++metrics->messages_suppress_offers;
 
-  allocator->quiesceOffers(framework->id());
+  allocator->suppressOffers(framework->id());
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/master/metrics.cpp
----------------------------------------------------------------------
diff --git a/src/master/metrics.cpp b/src/master/metrics.cpp
index 6bce80b..a92bdbd 100644
--- a/src/master/metrics.cpp
+++ b/src/master/metrics.cpp
@@ -114,8 +114,8 @@ Metrics::Metrics(const Master& master)
         "master/messages_decline_offers"),
     messages_revive_offers(
         "master/messages_revive_offers"),
-    messages_quiesce_offers(
-        "master/messages_quiesce_offers"),
+    messages_suppress_offers(
+        "master/messages_suppress_offers"),
     messages_reconcile_tasks(
         "master/messages_reconcile_tasks"),
     messages_framework_to_executor(
@@ -220,7 +220,7 @@ Metrics::Metrics(const Master& master)
   process::metrics::add(messages_launch_tasks);
   process::metrics::add(messages_decline_offers);
   process::metrics::add(messages_revive_offers);
-  process::metrics::add(messages_quiesce_offers);
+  process::metrics::add(messages_suppress_offers);
   process::metrics::add(messages_reconcile_tasks);
   process::metrics::add(messages_framework_to_executor);
   process::metrics::add(messages_executor_to_framework);
@@ -356,7 +356,7 @@ Metrics::~Metrics()
   process::metrics::remove(messages_launch_tasks);
   process::metrics::remove(messages_decline_offers);
   process::metrics::remove(messages_revive_offers);
-  process::metrics::remove(messages_quiesce_offers);
+  process::metrics::remove(messages_suppress_offers);
   process::metrics::remove(messages_reconcile_tasks);
   process::metrics::remove(messages_framework_to_executor);
   process::metrics::remove(messages_executor_to_framework);

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/master/metrics.hpp
----------------------------------------------------------------------
diff --git a/src/master/metrics.hpp b/src/master/metrics.hpp
index a3c0c0c..d77409e 100644
--- a/src/master/metrics.hpp
+++ b/src/master/metrics.hpp
@@ -130,7 +130,7 @@ struct Metrics
   process::metrics::Counter messages_launch_tasks;
   process::metrics::Counter messages_decline_offers;
   process::metrics::Counter messages_revive_offers;
-  process::metrics::Counter messages_quiesce_offers;
+  process::metrics::Counter messages_suppress_offers;
   process::metrics::Counter messages_reconcile_tasks;
   process::metrics::Counter messages_framework_to_executor;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/python/interface/src/mesos/interface/__init__.py
----------------------------------------------------------------------
diff --git a/src/python/interface/src/mesos/interface/__init__.py b/src/python/interface/src/mesos/interface/__init__.py
index cd60ead..4be502f 100644
--- a/src/python/interface/src/mesos/interface/__init__.py
+++ b/src/python/interface/src/mesos/interface/__init__.py
@@ -230,7 +230,7 @@ class SchedulerDriver(object):
       those filtered slaves.
     """
 
-  def quiesceOffers(self):
+  def suppressOffers(self):
     """
       Inform Mesos master to stop sending offers to the framework. The
       scheduler should call reviveOffers() to resume getting offers.

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.cpp
----------------------------------------------------------------------
diff --git a/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.cpp b/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.cpp
index 10208b1..9e35b30 100644
--- a/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.cpp
+++ b/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.cpp
@@ -143,10 +143,10 @@ PyMethodDef MesosSchedulerDriverImpl_methods[] = {
     METH_NOARGS,
     "Remove all filters and ask Mesos for new offers"
   },
-  { "quiesceOffers",
-    (PyCFunction) MesosSchedulerDriverImpl_quiesceOffers,
+  { "suppressOffers",
+    (PyCFunction) MesosSchedulerDriverImpl_suppressOffers,
     METH_NOARGS,
-    "Set quiescent attribute as true for the Framework"
+    "Set suppressed attribute as true for the Framework"
   },
   { "acknowledgeStatusUpdate",
     (PyCFunction) MesosSchedulerDriverImpl_acknowledgeStatusUpdate,
@@ -659,14 +659,15 @@ PyObject* MesosSchedulerDriverImpl_reviveOffers(MesosSchedulerDriverImpl* self)
 }
 
 
-PyObject* MesosSchedulerDriverImpl_quiesceOffers(MesosSchedulerDriverImpl* self)
+PyObject* MesosSchedulerDriverImpl_suppressOffers(
+    MesosSchedulerDriverImpl* self)
 {
   if (self->driver == NULL) {
     PyErr_Format(PyExc_Exception, "MesosSchedulerDriverImpl.driver is NULL");
     return NULL;
   }
 
-  Status status = self->driver->quiesceOffers();
+  Status status = self->driver->suppressOffers();
   return PyInt_FromLong(status); // Sets exception if creating long fails.
 }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.hpp
----------------------------------------------------------------------
diff --git a/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.hpp b/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.hpp
index 04e3190..3a150fe 100644
--- a/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.hpp
+++ b/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.hpp
@@ -115,7 +115,7 @@ PyObject* MesosSchedulerDriverImpl_declineOffer(
 
 PyObject* MesosSchedulerDriverImpl_reviveOffers(MesosSchedulerDriverImpl* self);
 
-PyObject* MesosSchedulerDriverImpl_quiesceOffers(
+PyObject* MesosSchedulerDriverImpl_suppressOffers(
     MesosSchedulerDriverImpl* self);
 
 PyObject* MesosSchedulerDriverImpl_acknowledgeStatusUpdate(

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/sched/sched.cpp
----------------------------------------------------------------------
diff --git a/src/sched/sched.cpp b/src/sched/sched.cpp
index 1d5eeea..571e00d 100644
--- a/src/sched/sched.cpp
+++ b/src/sched/sched.cpp
@@ -1242,10 +1242,10 @@ protected:
     send(master.get().pid(), call);
   }
 
-  void quiesceOffers()
+  void suppressOffers()
   {
     if (!connected) {
-      VLOG(1) << "Ignoring quiesce offers message as master is disconnected";
+      VLOG(1) << "Ignoring suppress offers message as master is disconnected";
       return;
     }
 
@@ -1951,7 +1951,7 @@ Status MesosSchedulerDriver::reviveOffers()
 }
 
 
-Status MesosSchedulerDriver::quiesceOffers()
+Status MesosSchedulerDriver::suppressOffers()
 {
   synchronized (mutex) {
     if (status != DRIVER_RUNNING) {
@@ -1960,7 +1960,7 @@ Status MesosSchedulerDriver::quiesceOffers()
 
     CHECK(process != NULL);
 
-    dispatch(process, &SchedulerProcess::quiesceOffers);
+    dispatch(process, &SchedulerProcess::suppressOffers);
 
     return status;
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/tests/master_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index a044286..f26344d 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -1511,7 +1511,7 @@ TEST_F(MasterTest, MetricsInMetricsEndpoint)
   EXPECT_EQ(1u, snapshot.values.count("master/messages_launch_tasks"));
   EXPECT_EQ(1u, snapshot.values.count("master/messages_decline_offers"));
   EXPECT_EQ(1u, snapshot.values.count("master/messages_revive_offers"));
-  EXPECT_EQ(1u, snapshot.values.count("master/messages_quiesce_offers"));
+  EXPECT_EQ(1u, snapshot.values.count("master/messages_suppress_offers"));
   EXPECT_EQ(1u, snapshot.values.count("master/messages_reconcile_tasks"));
   EXPECT_EQ(1u, snapshot.values.count("master/messages_framework_to_executor"));
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/tests/mesos.hpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.hpp b/src/tests/mesos.hpp
index e1c0635..ff241cc 100644
--- a/src/tests/mesos.hpp
+++ b/src/tests/mesos.hpp
@@ -1380,9 +1380,9 @@ ACTION_P2(InvokeRecoverResourcesWithFilters, allocator, timeout)
 }
 
 
-ACTION_P(InvokeQuiesceOffers, allocator)
+ACTION_P(InvokeSuppressOffers, allocator)
 {
-  allocator->real->quiesceOffers(arg0);
+  allocator->real->suppressOffers(arg0);
 }
 
 
@@ -1514,9 +1514,9 @@ public:
     EXPECT_CALL(*this, reviveOffers(_))
       .WillRepeatedly(DoDefault());
 
-    ON_CALL(*this, quiesceOffers(_))
-      .WillByDefault(InvokeQuiesceOffers(this));
-    EXPECT_CALL(*this, quiesceOffers(_))
+    ON_CALL(*this, suppressOffers(_))
+      .WillByDefault(InvokeSuppressOffers(this));
+    EXPECT_CALL(*this, suppressOffers(_))
       .WillRepeatedly(DoDefault());
   }
 
@@ -1605,7 +1605,7 @@ public:
 
   MOCK_METHOD1(reviveOffers, void(const FrameworkID&));
 
-  MOCK_METHOD1(quiesceOffers, void(const FrameworkID&));
+  MOCK_METHOD1(suppressOffers, void(const FrameworkID&));
 
   process::Owned<mesos::master::allocator::Allocator> real;
 };

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/tests/metrics_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/metrics_tests.cpp b/src/tests/metrics_tests.cpp
index 9b7f84a..e91fe66 100644
--- a/src/tests/metrics_tests.cpp
+++ b/src/tests/metrics_tests.cpp
@@ -97,7 +97,7 @@ TEST_F(MetricsTest, Master)
   EXPECT_EQ(1u, stats.values.count("master/messages_launch_tasks"));
   EXPECT_EQ(1u, stats.values.count("master/messages_decline_offers"));
   EXPECT_EQ(1u, stats.values.count("master/messages_revive_offers"));
-  EXPECT_EQ(1u, stats.values.count("master/messages_quiesce_offers"));
+  EXPECT_EQ(1u, stats.values.count("master/messages_suppress_offers"));
   EXPECT_EQ(1u, stats.values.count("master/messages_reconcile_tasks"));
   EXPECT_EQ(1u, stats.values.count("master/messages_framework_to_executor"));
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/10ac36a1/src/tests/scheduler_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/scheduler_tests.cpp b/src/tests/scheduler_tests.cpp
index 3d4806f..7946cb4 100644
--- a/src/tests/scheduler_tests.cpp
+++ b/src/tests/scheduler_tests.cpp
@@ -941,7 +941,7 @@ TEST_P(SchedulerTest, Revive)
 }
 
 
-TEST_P(SchedulerTest, Quiesce)
+TEST_P(SchedulerTest, Suppress)
 {
   master::Flags flags = CreateMasterFlags();
   flags.authenticate_frameworks = false;
@@ -1019,7 +1019,7 @@ TEST_P(SchedulerTest, Quiesce)
   }
 
   // No offers should be sent within 100 mins because the framework
-  // quiesced offers.
+  // suppressed offers.
   Clock::pause();
   Clock::advance(Minutes(100));
   Clock::settle();
@@ -1027,9 +1027,8 @@ TEST_P(SchedulerTest, Quiesce)
   event = events.get();
   ASSERT_TRUE(event.isPending());
 
-  // On revival the quiescent should be set as false and the scheduler
-  // should get another offer with same amount of resources. Framework
-  // should receive offers only after calling reviving offers.
+  // On reviving offers the scheduler should get another offer with same amount
+  // of resources.
   {
     Call call;
     call.mutable_framework_id()->CopyFrom(id);


[3/4] mesos git commit: libprocess: Renamed suppress macro to SUPPRESS.

Posted by vi...@apache.org.
libprocess: Renamed suppress macro to SUPPRESS.

The macro suppress conflicts with suppress() for a call in master.
This patch updates macro suppress to SUPPRESS to resolve the conflict.

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


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

Branch: refs/heads/master
Commit: 9d15cd3eb9243abf07947b266a43791ce8d11d1e
Parents: 10ac36a
Author: Guangya Liu <gy...@gmail.com>
Authored: Mon Sep 21 12:09:19 2015 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Sep 21 12:09:19 2015 -0700

----------------------------------------------------------------------
 .../libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp  | 2 +-
 3rdparty/libprocess/3rdparty/stout/include/stout/os/signals.hpp    | 2 +-
 .../libprocess/3rdparty/stout/include/stout/os/windows/signals.hpp | 2 +-
 3rdparty/libprocess/3rdparty/stout/tests/os/signals_tests.cpp      | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9d15cd3e/3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp
index 50ad49e..828c9c7 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp
@@ -40,7 +40,7 @@ namespace os {
 inline ssize_t sendfile(int s, int fd, off_t offset, size_t length)
 {
 #if defined(__linux__) || defined(__sun)
-  suppress (SIGPIPE) {
+  SUPPRESS (SIGPIPE) {
     // This will set errno to EPIPE if a SIGPIPE occurs.
     return ::sendfile(s, fd, &offset, length);
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/9d15cd3e/3rdparty/libprocess/3rdparty/stout/include/stout/os/signals.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/os/signals.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/os/signals.hpp
index 7a79024..16fd715 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/os/signals.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/os/signals.hpp
@@ -24,7 +24,7 @@
 #endif // __WINDOWS__
 
 
-#define suppress(signal) \
+#define SUPPRESS(signal) \
   if (os::signals::internal::Suppressor suppressor ## signal = \
       os::signals::internal::Suppressor(signal))
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/9d15cd3e/3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/signals.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/signals.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/signals.hpp
index 8361a13..60aa9ad 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/signals.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/signals.hpp
@@ -79,7 +79,7 @@ struct Suppressor
     UNIMPLEMENTED;
   }
 
-  // Needed for the suppress() macro.
+  // Needed for the SUPPRESS() macro.
   operator bool() { return true; }
 };
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/9d15cd3e/3rdparty/libprocess/3rdparty/stout/tests/os/signals_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/tests/os/signals_tests.cpp b/3rdparty/libprocess/3rdparty/stout/tests/os/signals_tests.cpp
index de86232..4bb79fd 100644
--- a/3rdparty/libprocess/3rdparty/stout/tests/os/signals_tests.cpp
+++ b/3rdparty/libprocess/3rdparty/stout/tests/os/signals_tests.cpp
@@ -40,7 +40,7 @@ TEST_F(OsSignalsTest, Suppress)
   const string data = "hello";
 
   // Let's make sure we can suppress SIGPIPE!
-  suppress(SIGPIPE) {
+  SUPPRESS(SIGPIPE) {
     // Writing to a pipe that has been closed generates SIGPIPE.
     ASSERT_EQ(-1, write(pipes[1], data.c_str(), data.length()));
 


[4/4] mesos git commit: Changed function quiesce() to suppress().

Posted by vi...@apache.org.
Changed function quiesce() to suppress().

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


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

Branch: refs/heads/master
Commit: a2e740d36550b1bf7f6fe9ad3ec0242a7f9d7a74
Parents: 9d15cd3
Author: Guangya Liu <gy...@gmail.com>
Authored: Mon Sep 21 12:10:20 2015 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Sep 21 12:27:17 2015 -0700

----------------------------------------------------------------------
 src/master/http.cpp   | 2 +-
 src/master/master.cpp | 4 ++--
 src/master/master.hpp | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a2e740d3/src/master/http.cpp
----------------------------------------------------------------------
diff --git a/src/master/http.cpp b/src/master/http.cpp
index 6c3f7d8..3e44b06 100644
--- a/src/master/http.cpp
+++ b/src/master/http.cpp
@@ -483,7 +483,7 @@ Future<Response> Master::Http::scheduler(const Request& request) const
       return Accepted();
 
     case scheduler::Call::SUPPRESS:
-      master->quiesce(framework);
+      master->suppress(framework);
       return Accepted();
 
     case scheduler::Call::KILL:

http://git-wip-us.apache.org/repos/asf/mesos/blob/a2e740d3/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index d4a3fb1..90ef8c6 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -1782,7 +1782,7 @@ void Master::receive(
       break;
 
     case scheduler::Call::SUPPRESS:
-      quiesce(framework);
+      suppress(framework);
       break;
 
     default:
@@ -2619,7 +2619,7 @@ void Master::request(
 }
 
 
-void Master::quiesce(Framework* framework)
+void Master::suppress(Framework* framework)
 {
   CHECK_NOTNULL(framework);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/a2e740d3/src/master/master.hpp
----------------------------------------------------------------------
diff --git a/src/master/master.hpp b/src/master/master.hpp
index 0c1e81c..4bb65f0 100644
--- a/src/master/master.hpp
+++ b/src/master/master.hpp
@@ -829,7 +829,7 @@ private:
       Framework* framework,
       const scheduler::Call::Request& request);
 
-  void quiesce(Framework* framework);
+  void suppress(Framework* framework);
 
   bool elected() const
   {