You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/03/22 19:30:26 UTC

[1/2] mesos git commit: Documented the existing allocator metric.

Repository: mesos
Updated Branches:
  refs/heads/master 9ba8acf78 -> d5f4b073e


Documented the existing allocator metric.

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


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

Branch: refs/heads/master
Commit: d5f4b073ed0bd54a5871a2143f6e5bef1443bf06
Parents: 541fc66
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Tue Mar 22 11:01:27 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Tue Mar 22 11:30:09 2016 -0700

----------------------------------------------------------------------
 docs/monitoring.md | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d5f4b073/docs/monitoring.md
----------------------------------------------------------------------
diff --git a/docs/monitoring.md b/docs/monitoring.md
index 827f707..24c07a4 100644
--- a/docs/monitoring.md
+++ b/docs/monitoring.md
@@ -857,6 +857,24 @@ slave registrar.
 </table>
 
 
+#### Allocator
+
+The following metrics provide information about performance
+and resource allocations in the allocator.
+
+<table class="table table-stripped">
+<thead>
+<tr><th>Metric</th><th>Description</th><th>Type</th>
+</thead>
+<tr>
+  <td>
+  <code>allocator/mesos/event_queue_dispatches</code>
+  </td>
+  <td>Number of dispatch events in the event queue</td>
+  <td>Gauge</td>
+</tr>
+</table>
+
 ### Basic Alerts
 
 This section lists some examples of basic alerts that you can use to detect


[2/2] mesos git commit: Prefixed allocator metrics with "mesos/" to support custom allocators.

Posted by bm...@apache.org.
Prefixed allocator metrics with "mesos/" to support custom allocators.

Since allocators can be replaced with a custom module instead use a
name clearly communicating that the metrics reported here are related
to the default (hierarchical) allocator.

For backwards compatibility we continue to support the old metrics
name.

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


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

Branch: refs/heads/master
Commit: 541fc66b7d22517376eff4de5fe1a9c7b8a28556
Parents: 9ba8acf
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Tue Mar 22 10:33:16 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Tue Mar 22 11:30:09 2016 -0700

----------------------------------------------------------------------
 CHANGELOG                              |  4 ++++
 docs/upgrades.md                       | 24 ++++++++++++++++++++++++
 src/master/allocator/mesos/metrics.cpp |  7 +++++++
 src/master/allocator/mesos/metrics.hpp |  4 ++++
 src/tests/master_tests.cpp             |  5 ++++-
 5 files changed, 43 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/541fc66b/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index eab924e..1fadaa1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,10 @@
 Release Notes - Mesos - Version 0.29.0 (WIP)
 --------------------------------------------
 
+Deprecations:
+  * [MESOS-5001] - The 'allocator/event_queue_dispatches' metric is now
+    deprecated in favor 'of allocator/mesos/event_queue_dispatches'.
+
 Additional API Changes:
   * [MESOS-4735] - Add 'filename' field to CommandInfo.URI in Scheduler API
     and v1 Scheduler HTTP API.

http://git-wip-us.apache.org/repos/asf/mesos/blob/541fc66b/docs/upgrades.md
----------------------------------------------------------------------
diff --git a/docs/upgrades.md b/docs/upgrades.md
index 83b839f..f8bd8a2 100644
--- a/docs/upgrades.md
+++ b/docs/upgrades.md
@@ -43,6 +43,24 @@ We categorize the changes as follows:
   </thead>
 <tr>
   <td style="word-wrap: break-word; overflow-wrap: break-word;"><!--Version-->
+  0.29.x
+  </td>
+  <td style="word-wrap: break-word; overflow-wrap: break-word;"><!--Mesos Core-->
+    <ul style="padding-left:10px;">
+      <li>CD <a href="#0-29-x-allocator-metrics">Allocator Metrics</a></li>
+    </ul>
+  </td>
+  <td style="word-wrap: break-word; overflow-wrap: break-word;"><!--Flags-->
+  </td>
+  <td style="word-wrap: break-word; overflow-wrap: break-word;"><!--Framework API-->
+  </td>
+  <td style="word-wrap: break-word; overflow-wrap: break-word;"><!--Module API-->
+  </td>
+  <td style="word-wrap: break-word; overflow-wrap: break-word;"><!--Endpoints-->
+  </td>
+</tr>
+<tr>
+  <td style="word-wrap: break-word; overflow-wrap: break-word;"><!--Version-->
   0.28.x
   </td>
   <td style="word-wrap: break-word; overflow-wrap: break-word;"><!--Mesos Core-->
@@ -134,6 +152,12 @@ We categorize the changes as follows:
 </tr>
 </table>
 
+## Upgrading from 0.28.x to 0.29.x ##
+
+<a name="0-29-x-allocator-metrics"></a>
+
+* The allocator metric named <code>allocator/event_queue_dispatches</code> is now deprecated and will be removed with 0.30. The new name is <code>allocator/mesos/event_queue_dispatches</code> to better support metrics for alternative allocator implementations.
+
 ## Upgrading from 0.27.x to 0.28.x ##
 
 <a name="0-28-x-resource-precision"></a>

http://git-wip-us.apache.org/repos/asf/mesos/blob/541fc66b/src/master/allocator/mesos/metrics.cpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/metrics.cpp b/src/master/allocator/mesos/metrics.cpp
index 46dd7f7..42c751b 100644
--- a/src/master/allocator/mesos/metrics.cpp
+++ b/src/master/allocator/mesos/metrics.cpp
@@ -27,18 +27,25 @@ namespace internal {
 
 Metrics::Metrics(const HierarchicalAllocatorProcess& allocator)
   : event_queue_dispatches(
+        "allocator/mesos/event_queue_dispatches",
+        process::defer(
+            allocator.self(),
+            &HierarchicalAllocatorProcess::_event_queue_dispatches)),
+    event_queue_dispatches_(
         "allocator/event_queue_dispatches",
         process::defer(
             allocator.self(),
             &HierarchicalAllocatorProcess::_event_queue_dispatches))
 {
   process::metrics::add(event_queue_dispatches);
+  process::metrics::add(event_queue_dispatches_);
 }
 
 
 Metrics::~Metrics()
 {
   process::metrics::remove(event_queue_dispatches);
+  process::metrics::remove(event_queue_dispatches_);
 }
 
 } // namespace internal {

http://git-wip-us.apache.org/repos/asf/mesos/blob/541fc66b/src/master/allocator/mesos/metrics.hpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/metrics.hpp b/src/master/allocator/mesos/metrics.hpp
index d04e9a1..0ae678b 100644
--- a/src/master/allocator/mesos/metrics.hpp
+++ b/src/master/allocator/mesos/metrics.hpp
@@ -36,6 +36,10 @@ public:
   ~Metrics();
 
   process::metrics::Gauge event_queue_dispatches;
+
+  // TODO(bbannier) This metric is identical to `event_queue_dispatches`, but
+  // uses a name deprecated in 0.29. This metric should be removed with 0.30.
+  process::metrics::Gauge event_queue_dispatches_;
 };
 
 } // namespace internal {

http://git-wip-us.apache.org/repos/asf/mesos/blob/541fc66b/src/tests/master_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index d34ba0b..0f7a2ca 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -1623,7 +1623,10 @@ TEST_F(MasterTest, MetricsInMetricsEndpoint)
   EXPECT_EQ(1u, snapshot.values.count("registrar/state_store_ms"));
 
   // Allocator Metrics.
-  EXPECT_EQ(1u, snapshot.values.count("allocator/event_queue_dispatches"));
+  EXPECT_EQ(1u, snapshot.values.count(
+      "allocator/event_queue_dispatches"));
+  EXPECT_EQ(1u, snapshot.values.count(
+      "allocator/mesos/event_queue_dispatches"));
 }