mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asekrete...@apache.org
Subject [mesos] branch master updated: Tied the 1st hierarchical allocator process to a process ID "allocator".
Date Tue, 22 Sep 2020 10:25:09 GMT
This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/master by this push:
     new 81f231c  Tied the 1st hierarchical allocator process to a process ID "allocator".
81f231c is described below

commit 81f231ccd10e960b1485482a859bc449914668ed
Author: Andrei Sekretenko <asekretenko@apache.org>
AuthorDate: Thu Sep 17 21:44:53 2020 +0200

    Tied the 1st hierarchical allocator process to a process ID "allocator".
    
    The instances of `HierarchicalAllocatorProcess` launched in the same
    instance of libprocess after that will be assigned IDs like
    "allocator(2)", "allocator(3)" and so on.
    
    Previously, to query an HTTP endpoint exposed by the allocator,
    the user had to figure out the allocator process id and use it to build
    the URL (like "https://localhost:5050/hierarchical_allocator(1)/...");
    now, the allocator debugging endpoints are accessible via fixed URLs
    like "https://localhost:5050/allocator/offer_constraints_debug".
    
    Review: https://reviews.apache.org/r/72887
---
 src/master/allocator/mesos/hierarchical.hpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/master/allocator/mesos/hierarchical.hpp b/src/master/allocator/mesos/hierarchical.hpp
index 63444de..4ec15b6 100644
--- a/src/master/allocator/mesos/hierarchical.hpp
+++ b/src/master/allocator/mesos/hierarchical.hpp
@@ -35,6 +35,7 @@
 #include <stout/hashset.hpp>
 #include <stout/lambda.hpp>
 #include <stout/option.hpp>
+#include <stout/strings.hpp>
 
 #include "common/protobuf_utils.hpp"
 
@@ -968,7 +969,8 @@ class HierarchicalAllocatorProcess
 {
 public:
   HierarchicalAllocatorProcess()
-    : ProcessBase(process::ID::generate("hierarchical-allocator")),
+    : ProcessBase(strings::remove(
+          process::ID::generate("allocator"), "(1)", strings::Mode::SUFFIX)),
       internal::HierarchicalAllocatorProcess(
           [this]() -> Sorter* {
             return new RoleSorter(this->self(), "allocator/mesos/roles/");


Mime
View raw message