You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2016/08/03 12:53:26 UTC
[1/7] mesos git commit: Libprocess: Added id to the Sequence c-tor.
Repository: mesos
Updated Branches:
refs/heads/master 4f297654f -> 6f2a452d4
Libprocess: Added id to the Sequence c-tor.
Sequence IDs used to be tagged as "(1)", "(2)", etc. This made it
very hard to match the output from logging or the "__processes__"
endpoint to actors.
This change makes it possible to give sequence processes a
distinguishable ID and updates c-tor invocation sites.
Review: https://reviews.apache.org/r/50637/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/987fdef0
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/987fdef0
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/987fdef0
Branch: refs/heads/master
Commit: 987fdef0b2a71a49f17c9f250abb4b510dfba919
Parents: 4f29765
Author: Gast�n Kleiman <ga...@mesosphere.com>
Authored: Wed Aug 3 13:18:19 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Aug 3 13:45:05 2016 +0200
----------------------------------------------------------------------
3rdparty/libprocess/include/process/sequence.hpp | 11 +++++++----
3rdparty/libprocess/src/process.cpp | 4 ++--
2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/987fdef0/3rdparty/libprocess/include/process/sequence.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/sequence.hpp b/3rdparty/libprocess/include/process/sequence.hpp
index 78ccdb9..c9a46f2 100644
--- a/3rdparty/libprocess/include/process/sequence.hpp
+++ b/3rdparty/libprocess/include/process/sequence.hpp
@@ -16,6 +16,7 @@
#include <glog/logging.h>
#include <process/future.hpp>
+#include <process/id.hpp>
#include <process/owned.hpp>
#include <process/process.hpp>
@@ -32,7 +33,7 @@ class SequenceProcess;
class Sequence
{
public:
- Sequence();
+ Sequence(const std::string& id = "sequence");
~Sequence();
// Registers a callback that will be invoked when all the futures
@@ -62,7 +63,9 @@ private:
class SequenceProcess : public Process<SequenceProcess>
{
public:
- SequenceProcess() : last(Nothing()) {}
+ SequenceProcess(const std::string& id)
+ : ProcessBase(ID::generate(id)),
+ last(Nothing()) {}
template <typename T>
Future<T> add(const lambda::function<Future<T>()>& callback)
@@ -163,9 +166,9 @@ private:
};
-inline Sequence::Sequence()
+inline Sequence::Sequence(const std::string& id)
{
- process = new SequenceProcess();
+ process = new SequenceProcess(id);
process::spawn(process);
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/987fdef0/3rdparty/libprocess/src/process.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/process.cpp b/3rdparty/libprocess/src/process.cpp
index 7f331b8..629f164 100644
--- a/3rdparty/libprocess/src/process.cpp
+++ b/3rdparty/libprocess/src/process.cpp
@@ -1176,7 +1176,7 @@ void HttpProxy::initialize()
// constructor in order to prevent a deadlock between the
// SocketManager and the ProcessManager (see the comment in
// SocketManager::proxy).
- authentications.reset(new Sequence());
+ authentications.reset(new Sequence("__authentications__"));
}
@@ -3344,7 +3344,7 @@ void ProcessBase::visit(const HttpEvent& event)
// Lazily initialize the Sequence needed for ordering requests
// across authentication and authorization.
if (handlers.httpSequence.get() == nullptr) {
- handlers.httpSequence.reset(new Sequence());
+ handlers.httpSequence.reset(new Sequence("__auth_handlers__"));
}
CHECK(event.request->url.path.find('/') == 0); // See ProcessManager::handle.
[2/7] mesos git commit: Libprocess: Added missing process IDs.
Posted by al...@apache.org.
Libprocess: Added missing process IDs.
After this change, all libprocess actors receive a distinguishable
ID, making it possible to match the logging output or the output of
the "__process__" enpoint to the source actor.
Review: https://reviews.apache.org/r/50513/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/20062853
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/20062853
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/20062853
Branch: refs/heads/master
Commit: 20062853df5cddf37ce2c462621fda5b765cdc3c
Parents: 987fdef
Author: Gast�n Kleiman <ga...@mesosphere.com>
Authored: Wed Aug 3 13:22:01 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Aug 3 13:45:06 2016 +0200
----------------------------------------------------------------------
3rdparty/libprocess/include/process/collect.hpp | 7 +++++--
3rdparty/libprocess/include/process/protobuf.hpp | 5 ++++-
3rdparty/libprocess/include/process/run.hpp | 4 +++-
3rdparty/libprocess/src/authenticator.cpp | 5 ++++-
4 files changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/20062853/3rdparty/libprocess/include/process/collect.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/collect.hpp b/3rdparty/libprocess/include/process/collect.hpp
index 5a92b72..fccf55a 100644
--- a/3rdparty/libprocess/include/process/collect.hpp
+++ b/3rdparty/libprocess/include/process/collect.hpp
@@ -20,6 +20,7 @@
#include <process/check.hpp>
#include <process/defer.hpp>
#include <process/future.hpp>
+#include <process/id.hpp>
#include <process/owned.hpp>
#include <process/process.hpp>
@@ -65,7 +66,8 @@ public:
CollectProcess(
const std::list<Future<T>>& _futures,
Promise<std::list<T>>* _promise)
- : futures(_futures),
+ : ProcessBase(ID::generate("__collect__")),
+ futures(_futures),
promise(_promise),
ready(0) {}
@@ -131,7 +133,8 @@ public:
AwaitProcess(
const std::list<Future<T>>& _futures,
Promise<std::list<Future<T>>>* _promise)
- : futures(_futures),
+ : ProcessBase(ID::generate("__await__")),
+ futures(_futures),
promise(_promise),
ready(0) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/20062853/3rdparty/libprocess/include/process/protobuf.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/protobuf.hpp b/3rdparty/libprocess/include/process/protobuf.hpp
index 78ff40e..695c6e6 100644
--- a/3rdparty/libprocess/include/process/protobuf.hpp
+++ b/3rdparty/libprocess/include/process/protobuf.hpp
@@ -23,6 +23,7 @@
#include <process/defer.hpp>
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <process/process.hpp>
#include <stout/hashmap.hpp>
@@ -950,7 +951,9 @@ class ReqResProcess : public ProtobufProcess<ReqResProcess<Req, Res> >
{
public:
ReqResProcess(const process::UPID& _pid, const Req& _req)
- : pid(_pid), req(_req)
+ : process::ProcessBase(process::ID::generate("__req_res__")),
+ pid(_pid),
+ req(_req)
{
ProtobufProcess<ReqResProcess<Req, Res> >::template
install<Res>(&ReqResProcess<Req, Res>::response);
http://git-wip-us.apache.org/repos/asf/mesos/blob/20062853/3rdparty/libprocess/include/process/run.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/run.hpp b/3rdparty/libprocess/include/process/run.hpp
index d141fb0..2c8b836 100644
--- a/3rdparty/libprocess/include/process/run.hpp
+++ b/3rdparty/libprocess/include/process/run.hpp
@@ -15,6 +15,7 @@
#include <memory> // TODO(benh): Replace shared_ptr with unique_ptr.
+#include <process/id.hpp>
#include <process/process.hpp>
#include <stout/lambda.hpp>
@@ -30,7 +31,8 @@ class ThunkProcess : public Process<ThunkProcess<R>>
public:
ThunkProcess(std::shared_ptr<lambda::function<R()>> _thunk,
std::shared_ptr<Promise<R>> _promise)
- : thunk(_thunk),
+ : ProcessBase(ID::generate("__thunk__")),
+ thunk(_thunk),
promise(_promise) {}
virtual ~ThunkProcess() {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/20062853/3rdparty/libprocess/src/authenticator.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/authenticator.cpp b/3rdparty/libprocess/src/authenticator.cpp
index 55e8558..cfedb6f 100644
--- a/3rdparty/libprocess/src/authenticator.cpp
+++ b/3rdparty/libprocess/src/authenticator.cpp
@@ -11,6 +11,7 @@
// limitations under the License
#include <process/authenticator.hpp>
+#include <process/id.hpp>
#include <string>
#include <vector>
@@ -53,7 +54,9 @@ private:
BasicAuthenticatorProcess::BasicAuthenticatorProcess(
const string& realm,
const hashmap<string, string>& credentials)
- : realm_(realm), credentials_(credentials) {}
+ : ProcessBase(ID::generate("__basic_authenticator__")),
+ realm_(realm),
+ credentials_(credentials) {}
Future<AuthenticationResult> BasicAuthenticatorProcess::authenticate(
[7/7] mesos git commit: Ensured HierarchicalAllocatorProcess
specifies a process ID.
Posted by al...@apache.org.
Ensured HierarchicalAllocatorProcess specifies a process ID.
Review: https://reviews.apache.org/r/50563/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/6f2a452d
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/6f2a452d
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/6f2a452d
Branch: refs/heads/master
Commit: 6f2a452d4876b2073ad552df88aa6e49f3e36a34
Parents: 45e79a4
Author: Gast�n Kleiman <ga...@mesosphere.com>
Authored: Wed Aug 3 14:32:22 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Aug 3 14:32:22 2016 +0200
----------------------------------------------------------------------
src/master/allocator/mesos/hierarchical.hpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/6f2a452d/src/master/allocator/mesos/hierarchical.hpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/hierarchical.hpp b/src/master/allocator/mesos/hierarchical.hpp
index b72ba16..bdbc6d3 100644
--- a/src/master/allocator/mesos/hierarchical.hpp
+++ b/src/master/allocator/mesos/hierarchical.hpp
@@ -75,8 +75,7 @@ public:
const std::function<Sorter*()>& _roleSorterFactory,
const std::function<Sorter*()>& _frameworkSorterFactory,
const std::function<Sorter*()>& _quotaRoleSorterFactory)
- : ProcessBase(process::ID::generate("hierarchical-allocator")),
- initialized(false),
+ : initialized(false),
paused(true),
metrics(*this),
roleSorter(nullptr),
@@ -485,7 +484,8 @@ class HierarchicalAllocatorProcess
{
public:
HierarchicalAllocatorProcess()
- : internal::HierarchicalAllocatorProcess(
+ : ProcessBase(process::ID::generate("hierarchical-allocator")),
+ internal::HierarchicalAllocatorProcess(
[this]() -> Sorter* {
return new RoleSorter(this->self(), "allocator/mesos/roles/");
},
[6/7] mesos git commit: Added "zookeeper" prefix to ZK process IDs.
Posted by al...@apache.org.
Added "zookeeper" prefix to ZK process IDs.
Review: https://reviews.apache.org/r/50521/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/45e79a44
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/45e79a44
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/45e79a44
Branch: refs/heads/master
Commit: 45e79a4403167e0b91297e226ae64050648d7474
Parents: 6d671a9
Author: Gast�n Kleiman <ga...@mesosphere.com>
Authored: Wed Aug 3 14:30:43 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Aug 3 14:30:43 2016 +0200
----------------------------------------------------------------------
src/zookeeper/contender.cpp | 2 +-
src/zookeeper/detector.cpp | 2 +-
src/zookeeper/group.cpp | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/45e79a44/src/zookeeper/contender.cpp
----------------------------------------------------------------------
diff --git a/src/zookeeper/contender.cpp b/src/zookeeper/contender.cpp
index 3206581..fa49647 100644
--- a/src/zookeeper/contender.cpp
+++ b/src/zookeeper/contender.cpp
@@ -100,7 +100,7 @@ LeaderContenderProcess::LeaderContenderProcess(
Group* _group,
const string& _data,
const Option<string>& _label)
- : ProcessBase(process::ID::generate("leader-contender")),
+ : ProcessBase(process::ID::generate("zookeeper-leader-contender")),
group(_group),
data(_data),
label(_label) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/45e79a44/src/zookeeper/detector.cpp
----------------------------------------------------------------------
diff --git a/src/zookeeper/detector.cpp b/src/zookeeper/detector.cpp
index f1def68..c9fa49c 100644
--- a/src/zookeeper/detector.cpp
+++ b/src/zookeeper/detector.cpp
@@ -63,7 +63,7 @@ private:
LeaderDetectorProcess::LeaderDetectorProcess(Group* _group)
- : ProcessBase(ID::generate("leader-detector")),
+ : ProcessBase(ID::generate("zookeeper-leader-detector")),
group(_group),
leader(None()) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/45e79a44/src/zookeeper/group.cpp
----------------------------------------------------------------------
diff --git a/src/zookeeper/group.cpp b/src/zookeeper/group.cpp
index 7438ecc..2c1589b 100644
--- a/src/zookeeper/group.cpp
+++ b/src/zookeeper/group.cpp
@@ -90,7 +90,7 @@ GroupProcess::GroupProcess(
const Duration& _sessionTimeout,
const string& _znode,
const Option<Authentication>& _auth)
- : ProcessBase(ID::generate("group")),
+ : ProcessBase(ID::generate("zookeeper-group")),
servers(_servers),
sessionTimeout(_sessionTimeout),
znode(strings::remove(_znode, "/", strings::SUFFIX)),
@@ -110,7 +110,7 @@ GroupProcess::GroupProcess(
GroupProcess::GroupProcess(
const URL& url,
const Duration& _sessionTimeout)
- : ProcessBase(ID::generate("group")),
+ : ProcessBase(ID::generate("zookeeper-group")),
servers(url.servers),
sessionTimeout(_sessionTimeout),
znode(strings::remove(url.path, "/", strings::SUFFIX)),
[4/7] mesos git commit: Libprocess: Renamed actor IDs for consistency.
Posted by al...@apache.org.
Libprocess: Renamed actor IDs for consistency.
Enforce the following actor ID schema in libprocess:
- Actor IDs contain only lowercase characters, dashes or underscores.
- The ID of an actor that is exposed to libprocess users, via a route/
associated to an endpoint uses dashes as word separator, e.g., `help`.
- The ID of an actor internal to libprocess, with not associated
route/endpoint, must be enclosed in double quotes and use underscores
instead of dashes as word separator, e.g.,
`__authentication_router__`.
Review: https://reviews.apache.org/r/50519/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a755c24f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a755c24f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a755c24f
Branch: refs/heads/master
Commit: a755c24f80752c9a27b761852a5a561072d53fae
Parents: 145a73c
Author: Gast�n Kleiman <ga...@mesosphere.com>
Authored: Wed Aug 3 14:25:34 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Aug 3 14:28:07 2016 +0200
----------------------------------------------------------------------
3rdparty/libprocess/src/authenticator_manager.cpp | 2 +-
3rdparty/libprocess/src/reap.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/a755c24f/3rdparty/libprocess/src/authenticator_manager.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/authenticator_manager.cpp b/3rdparty/libprocess/src/authenticator_manager.cpp
index 7def832..a22acd0 100644
--- a/3rdparty/libprocess/src/authenticator_manager.cpp
+++ b/3rdparty/libprocess/src/authenticator_manager.cpp
@@ -55,7 +55,7 @@ private:
AuthenticatorManagerProcess::AuthenticatorManagerProcess()
- : ProcessBase(ID::generate("AuthenticationRouter")) {}
+ : ProcessBase(ID::generate("__authentication_router__")) {}
Future<Nothing> AuthenticatorManagerProcess::setAuthenticator(
http://git-wip-us.apache.org/repos/asf/mesos/blob/a755c24f/3rdparty/libprocess/src/reap.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/reap.cpp b/3rdparty/libprocess/src/reap.cpp
index ac60c6d..f8d2fdc 100644
--- a/3rdparty/libprocess/src/reap.cpp
+++ b/3rdparty/libprocess/src/reap.cpp
@@ -64,7 +64,7 @@ Duration MAX_REAP_INTERVAL() { return Seconds(1); }
class ReaperProcess : public Process<ReaperProcess>
{
public:
- ReaperProcess() : ProcessBase(ID::generate("reaper")) {}
+ ReaperProcess() : ProcessBase(ID::generate("__reaper__")) {}
Future<Option<int> > reap(pid_t pid)
{
[5/7] mesos git commit: Renamed actor IDs for consistency.
Posted by al...@apache.org.
Renamed actor IDs for consistency.
Make all actor IDs contain only lower case letters and dashes
(not underscores).
Review: https://reviews.apache.org/r/50639/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/6d671a91
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/6d671a91
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/6d671a91
Branch: refs/heads/master
Commit: 6d671a91e1ebb118dfc08e708e096d2987f99434
Parents: a755c24
Author: Gast�n Kleiman <ga...@mesosphere.com>
Authored: Wed Aug 3 14:29:02 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Aug 3 14:29:02 2016 +0200
----------------------------------------------------------------------
src/authentication/cram_md5/authenticatee.cpp | 2 +-
src/authentication/cram_md5/authenticator.cpp | 4 ++--
src/executor/v0_v1executor.cpp | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/6d671a91/src/authentication/cram_md5/authenticatee.cpp
----------------------------------------------------------------------
diff --git a/src/authentication/cram_md5/authenticatee.cpp b/src/authentication/cram_md5/authenticatee.cpp
index 236de25..16291a1 100644
--- a/src/authentication/cram_md5/authenticatee.cpp
+++ b/src/authentication/cram_md5/authenticatee.cpp
@@ -56,7 +56,7 @@ public:
CRAMMD5AuthenticateeProcess(
const Credential& _credential,
const UPID& _client)
- : ProcessBase(ID::generate("crammd5_authenticatee")),
+ : ProcessBase(ID::generate("crammd5-authenticatee")),
credential(_credential),
client(_client),
status(READY),
http://git-wip-us.apache.org/repos/asf/mesos/blob/6d671a91/src/authentication/cram_md5/authenticator.cpp
----------------------------------------------------------------------
diff --git a/src/authentication/cram_md5/authenticator.cpp b/src/authentication/cram_md5/authenticator.cpp
index 4ec1568..9f89578 100644
--- a/src/authentication/cram_md5/authenticator.cpp
+++ b/src/authentication/cram_md5/authenticator.cpp
@@ -59,7 +59,7 @@ class CRAMMD5AuthenticatorSessionProcess :
{
public:
explicit CRAMMD5AuthenticatorSessionProcess(const UPID& _pid)
- : ProcessBase(ID::generate("crammd5_authenticator_session")),
+ : ProcessBase(ID::generate("crammd5-authenticator-session")),
status(READY),
pid(_pid),
connection(nullptr) {}
@@ -405,7 +405,7 @@ class CRAMMD5AuthenticatorProcess :
{
public:
CRAMMD5AuthenticatorProcess() :
- ProcessBase(ID::generate("crammd5_authenticator")) {}
+ ProcessBase(ID::generate("crammd5-authenticator")) {}
virtual ~CRAMMD5AuthenticatorProcess() {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/6d671a91/src/executor/v0_v1executor.cpp
----------------------------------------------------------------------
diff --git a/src/executor/v0_v1executor.cpp b/src/executor/v0_v1executor.cpp
index cd1c590..61d5919 100644
--- a/src/executor/v0_v1executor.cpp
+++ b/src/executor/v0_v1executor.cpp
@@ -50,7 +50,7 @@ public:
const function<void(void)>& connected,
const function<void(void)>& disconnected,
const function<void(const queue<Event>&)>& received)
- : ProcessBase(process::ID::generate("v0ToV1Adapter")),
+ : ProcessBase(process::ID::generate("v0-to-v1-adapter")),
callbacks {connected, disconnected, received},
subscribeCall(false) {}
[3/7] mesos git commit: Added missing process IDs.
Posted by al...@apache.org.
Added missing process IDs.
After this change, all actors receive a distinguishable ID,
making it possible to match the logging output or the output
of the "__process__" enpoint to the source actor.
Review: https://reviews.apache.org/r/50515/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/145a73c4
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/145a73c4
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/145a73c4
Branch: refs/heads/master
Commit: 145a73c4efff5ee38fbd2a52f971049b4892699e
Parents: 2006285
Author: Gast�n Kleiman <ga...@mesosphere.com>
Authored: Wed Aug 3 13:46:40 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Aug 3 14:04:36 2016 +0200
----------------------------------------------------------------------
src/examples/test_hook_module.cpp | 3 +++
src/exec/exec.cpp | 3 ++-
src/linux/cgroups.cpp | 18 +++++++++++++-----
src/linux/perf.cpp | 5 ++++-
src/linux/routing/link/link.cpp | 5 ++++-
src/slave/container_loggers/logrotate.cpp | 4 +++-
src/slave/container_loggers/sandbox.cpp | 4 ++++
src/slave/containerizer/composing.cpp | 4 +++-
src/slave/containerizer/mesos/containerizer.hpp | 6 +++++-
.../mesos/isolators/appc/runtime.cpp | 5 ++++-
.../mesos/isolators/cgroups/cgroups.cpp | 4 +++-
.../mesos/isolators/cgroups/cpushare.cpp | 4 +++-
.../mesos/isolators/cgroups/devices.cpp | 3 ++-
.../containerizer/mesos/isolators/cgroups/mem.cpp | 4 +++-
.../mesos/isolators/cgroups/net_cls.cpp | 3 ++-
.../mesos/isolators/cgroups/perf_event.hpp | 4 +++-
.../mesos/isolators/docker/runtime.cpp | 5 ++++-
.../mesos/isolators/docker/volume/isolator.cpp | 4 +++-
.../mesos/isolators/filesystem/linux.cpp | 4 +++-
.../mesos/isolators/filesystem/posix.cpp | 5 ++++-
.../mesos/isolators/filesystem/shared.cpp | 5 ++++-
.../mesos/isolators/filesystem/windows.cpp | 5 ++++-
.../mesos/isolators/gpu/isolator.cpp | 4 +++-
.../mesos/isolators/namespaces/pid.hpp | 5 ++++-
.../mesos/isolators/network/cni/cni.hpp | 4 +++-
.../mesos/isolators/network/port_mapping.hpp | 4 +++-
src/slave/containerizer/mesos/isolators/posix.hpp | 7 +++++--
.../containerizer/mesos/isolators/posix/disk.cpp | 9 +++++++--
.../containerizer/mesos/isolators/windows.hpp | 7 +++++--
.../containerizer/mesos/isolators/xfs/disk.cpp | 5 ++++-
.../mesos/provisioner/appc/store.cpp | 4 +++-
.../mesos/provisioner/backends/aufs.cpp | 4 ++++
.../mesos/provisioner/backends/bind.cpp | 4 ++++
.../mesos/provisioner/backends/copy.cpp | 4 ++++
.../mesos/provisioner/backends/overlay.cpp | 4 ++++
.../mesos/provisioner/docker/local_puller.cpp | 4 +++-
.../mesos/provisioner/docker/registry_puller.cpp | 3 ++-
.../mesos/provisioner/docker/store.cpp | 4 +++-
.../mesos/provisioner/provisioner.cpp | 3 ++-
src/slave/gc.hpp | 4 ++++
src/slave/qos_controllers/load.cpp | 4 +++-
src/slave/qos_controllers/noop.cpp | 4 +++-
src/slave/resource_estimators/fixed.cpp | 4 +++-
src/slave/resource_estimators/noop.cpp | 4 ++++
src/state/in_memory.cpp | 4 ++++
src/state/leveldb.cpp | 5 ++++-
src/state/log.cpp | 4 +++-
src/state/zookeeper.cpp | 4 +++-
src/uri/fetchers/docker.cpp | 4 +++-
49 files changed, 180 insertions(+), 47 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/examples/test_hook_module.cpp
----------------------------------------------------------------------
diff --git a/src/examples/test_hook_module.cpp b/src/examples/test_hook_module.cpp
index f4063d3..5e91a71 100644
--- a/src/examples/test_hook_module.cpp
+++ b/src/examples/test_hook_module.cpp
@@ -21,6 +21,7 @@
#include <mesos/module/hook.hpp>
#include <process/future.hpp>
+#include <process/id.hpp>
#include <process/process.hpp>
#include <process/protobuf.hpp>
@@ -48,6 +49,8 @@ const char* testErrorLabelKey = "MESOS_Test_Error_Label";
class HookProcess : public ProtobufProcess<HookProcess>
{
public:
+ HookProcess() : ProcessBase(process::ID::generate("example-hook")) {}
+
void initialize()
{
install<internal::HookExecuted>(
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/exec/exec.cpp
----------------------------------------------------------------------
diff --git a/src/exec/exec.cpp b/src/exec/exec.cpp
index 90a16a9..c1cda5a 100644
--- a/src/exec/exec.cpp
+++ b/src/exec/exec.cpp
@@ -84,7 +84,8 @@ class ShutdownProcess : public Process<ShutdownProcess>
{
public:
explicit ShutdownProcess(const Duration& _gracePeriod)
- : gracePeriod(_gracePeriod) {}
+ : ProcessBase(ID::generate("exec-shutdown")),
+ gracePeriod(_gracePeriod) {}
protected:
virtual void initialize()
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/linux/cgroups.cpp
----------------------------------------------------------------------
diff --git a/src/linux/cgroups.cpp b/src/linux/cgroups.cpp
index 610857a..f3232c0 100644
--- a/src/linux/cgroups.cpp
+++ b/src/linux/cgroups.cpp
@@ -37,6 +37,7 @@
#include <process/collect.hpp>
#include <process/defer.hpp>
#include <process/delay.hpp>
+#include <process/id.hpp>
#include <process/io.hpp>
#include <process/process.hpp>
#include <process/reap.hpp>
@@ -1192,7 +1193,8 @@ public:
const string& _cgroup,
const string& _control,
const Option<string>& _args)
- : hierarchy(_hierarchy),
+ : ProcessBase(ID::generate("cgroups-listener")),
+ hierarchy(_hierarchy),
cgroup(_cgroup),
control(_control),
args(_args),
@@ -1382,7 +1384,8 @@ public:
Freezer(
const string& _hierarchy,
const string& _cgroup)
- : hierarchy(_hierarchy),
+ : ProcessBase(ID::generate("cgroups-freezer")),
+ hierarchy(_hierarchy),
cgroup(_cgroup),
start(Clock::now()) {}
@@ -1482,7 +1485,9 @@ class TasksKiller : public Process<TasksKiller>
{
public:
TasksKiller(const string& _hierarchy, const string& _cgroup)
- : hierarchy(_hierarchy), cgroup(_cgroup) {}
+ : ProcessBase(ID::generate("cgroups-tasks-killer")),
+ hierarchy(_hierarchy),
+ cgroup(_cgroup) {}
virtual ~TasksKiller() {}
@@ -1621,7 +1626,9 @@ class Destroyer : public Process<Destroyer>
{
public:
Destroyer(const string& _hierarchy, const vector<string>& _cgroups)
- : hierarchy(_hierarchy), cgroups(_cgroups) {}
+ : ProcessBase(ID::generate("cgroups-destroyer")),
+ hierarchy(_hierarchy),
+ cgroups(_cgroups) {}
virtual ~Destroyer() {}
@@ -2313,7 +2320,8 @@ public:
CounterProcess(const string& hierarchy,
const string& cgroup,
Level level)
- : value_(0),
+ : ProcessBase(ID::generate("cgroups-counter")),
+ value_(0),
error(None()),
process(new event::Listener(
hierarchy,
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/linux/perf.cpp
----------------------------------------------------------------------
diff --git a/src/linux/perf.cpp b/src/linux/perf.cpp
index ea823b3..9455210 100644
--- a/src/linux/perf.cpp
+++ b/src/linux/perf.cpp
@@ -30,6 +30,7 @@
#include <process/clock.hpp>
#include <process/collect.hpp>
#include <process/defer.hpp>
+#include <process/id.hpp>
#include <process/io.hpp>
#include <process/process.hpp>
#include <process/subprocess.hpp>
@@ -79,7 +80,9 @@ inline string normalize(const string& s)
class Perf : public Process<Perf>
{
public:
- Perf(const vector<string>& _argv) : argv(_argv)
+ Perf(const vector<string>& _argv)
+ : ProcessBase(process::ID::generate("perf")),
+ argv(_argv)
{
// The first argument should be 'perf'. Note that this is
// a bit hacky because this class is specialized to only
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/linux/routing/link/link.cpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/link/link.cpp b/src/linux/routing/link/link.cpp
index 96bd50e..5388a3d 100644
--- a/src/linux/routing/link/link.cpp
+++ b/src/linux/routing/link/link.cpp
@@ -33,6 +33,7 @@
#include <vector>
#include <process/delay.hpp>
+#include <process/id.hpp>
#include <process/pid.hpp>
#include <process/process.hpp>
@@ -149,7 +150,9 @@ namespace internal {
class ExistenceChecker : public Process<ExistenceChecker>
{
public:
- ExistenceChecker(const string& _link) : link(_link) {}
+ ExistenceChecker(const string& _link)
+ : ProcessBase(process::ID::generate("link-existence-checker")),
+ link(_link) {}
virtual ~ExistenceChecker() {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/container_loggers/logrotate.cpp
----------------------------------------------------------------------
diff --git a/src/slave/container_loggers/logrotate.cpp b/src/slave/container_loggers/logrotate.cpp
index 89ea6cc..a96cbf1 100644
--- a/src/slave/container_loggers/logrotate.cpp
+++ b/src/slave/container_loggers/logrotate.cpp
@@ -23,6 +23,7 @@
#include <process/defer.hpp>
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <process/io.hpp>
#include <process/process.hpp>
@@ -48,7 +49,8 @@ class LogrotateLoggerProcess : public Process<LogrotateLoggerProcess>
{
public:
LogrotateLoggerProcess(const Flags& _flags)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("logrotate-logger")),
+ flags(_flags),
leading(None()),
bytesWritten(0)
{
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/container_loggers/sandbox.cpp
----------------------------------------------------------------------
diff --git a/src/slave/container_loggers/sandbox.cpp b/src/slave/container_loggers/sandbox.cpp
index 00272f8..807d792 100644
--- a/src/slave/container_loggers/sandbox.cpp
+++ b/src/slave/container_loggers/sandbox.cpp
@@ -24,6 +24,7 @@
#include <process/dispatch.hpp>
#include <process/future.hpp>
+#include <process/id.hpp>
#include <process/owned.hpp>
#include <process/process.hpp>
#include <process/subprocess.hpp>
@@ -51,6 +52,9 @@ class SandboxContainerLoggerProcess :
public Process<SandboxContainerLoggerProcess>
{
public:
+ SandboxContainerLoggerProcess()
+ : ProcessBase(process::ID::generate("sandbox-logger")) {}
+
Future<Nothing> recover(
const ExecutorInfo& executorInfo,
const std::string& sandboxDirectory)
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/composing.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/composing.cpp b/src/slave/containerizer/composing.cpp
index 15d059f..36d8917 100644
--- a/src/slave/containerizer/composing.cpp
+++ b/src/slave/containerizer/composing.cpp
@@ -20,6 +20,7 @@
#include <process/collect.hpp>
#include <process/defer.hpp>
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <stout/hashmap.hpp>
#include <stout/hashset.hpp>
@@ -48,7 +49,8 @@ class ComposingContainerizerProcess
public:
ComposingContainerizerProcess(
const vector<Containerizer*>& containerizers)
- : containerizers_(containerizers) {}
+ : ProcessBase(process::ID::generate("composing-containerizer")),
+ containerizers_(containerizers) {}
virtual ~ComposingContainerizerProcess();
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/containerizer.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/containerizer.hpp b/src/slave/containerizer/mesos/containerizer.hpp
index 3274e09..6585356 100644
--- a/src/slave/containerizer/mesos/containerizer.hpp
+++ b/src/slave/containerizer/mesos/containerizer.hpp
@@ -20,6 +20,7 @@
#include <list>
#include <vector>
+#include <process/id.hpp>
#include <process/sequence.hpp>
#include <process/metrics/counter.hpp>
@@ -126,7 +127,8 @@ public:
const process::Owned<Launcher>& _launcher,
const process::Owned<Provisioner>& _provisioner,
const std::vector<process::Owned<mesos::slave::Isolator>>& _isolators)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("mesos-containerizer")),
+ flags(_flags),
local(_local),
fetcher(_fetcher),
logger(_logger),
@@ -298,6 +300,8 @@ private:
struct Container
{
+ Container() : sequence("mesos-container-status-updates") {}
+
// Promise for futures returned from wait().
process::Promise<containerizer::Termination> promise;
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/appc/runtime.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/appc/runtime.cpp b/src/slave/containerizer/mesos/isolators/appc/runtime.cpp
index e8fe131..a96298b 100644
--- a/src/slave/containerizer/mesos/isolators/appc/runtime.cpp
+++ b/src/slave/containerizer/mesos/isolators/appc/runtime.cpp
@@ -19,6 +19,8 @@
#include <glog/logging.h>
+#include <process/id.hpp>
+
#include <stout/error.hpp>
#include <stout/foreach.hpp>
#include <stout/stringify.hpp>
@@ -47,7 +49,8 @@ namespace internal {
namespace slave {
AppcRuntimeIsolatorProcess::AppcRuntimeIsolatorProcess(const Flags& _flags)
- : flags(_flags) {}
+ : ProcessBase(process::ID::generate("appc-runtime-isolator")),
+ flags(_flags) {}
AppcRuntimeIsolatorProcess::~AppcRuntimeIsolatorProcess() {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp b/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
index 179eb07..2659252 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
@@ -18,6 +18,7 @@
#include <process/collect.hpp>
#include <process/defer.hpp>
+#include <process/id.hpp>
#include <process/pid.hpp>
#include <stout/error.hpp>
@@ -54,7 +55,8 @@ CgroupsIsolatorProcess::CgroupsIsolatorProcess(
const Flags& _flags,
const hashmap<string, string>& _hierarchies,
const multihashmap<string, Owned<Subsystem>>& _subsystems)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("cgroups-isolator")),
+ flags(_flags),
hierarchies(_hierarchies),
subsystems(_subsystems) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/cgroups/cpushare.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/cpushare.cpp b/src/slave/containerizer/mesos/isolators/cgroups/cpushare.cpp
index dddd4f0..221e814 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/cpushare.cpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/cpushare.cpp
@@ -21,6 +21,7 @@
#include <process/collect.hpp>
#include <process/defer.hpp>
+#include <process/id.hpp>
#include <process/pid.hpp>
#include <stout/bytes.hpp>
@@ -59,7 +60,8 @@ CgroupsCpushareIsolatorProcess::CgroupsCpushareIsolatorProcess(
const Flags& _flags,
const hashmap<string, string>& _hierarchies,
const vector<string>& _subsystems)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("cgroups-cpushare-isolator")),
+ flags(_flags),
hierarchies(_hierarchies),
subsystems(_subsystems) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/cgroups/devices.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/devices.cpp b/src/slave/containerizer/mesos/isolators/cgroups/devices.cpp
index 66db4fc..f1b5e75 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/devices.cpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/devices.cpp
@@ -95,7 +95,8 @@ static const char* DEFAULT_WHITELIST_ENTRIES[] = {
CgroupsDevicesIsolatorProcess::CgroupsDevicesIsolatorProcess(
const Flags& _flags,
const string& _hierarchy)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("cgroups-devices-isolator")),
+ flags(_flags),
hierarchy(_hierarchy) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp b/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp
index af8d165..0a4f38d 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp
@@ -24,6 +24,7 @@
#include <process/collect.hpp>
#include <process/defer.hpp>
+#include <process/id.hpp>
#include <process/pid.hpp>
#include <stout/bytes.hpp>
@@ -73,7 +74,8 @@ CgroupsMemIsolatorProcess::CgroupsMemIsolatorProcess(
const Flags& _flags,
const string& _hierarchy,
const bool _limitSwap)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("cgroups-mem-isolator")),
+ flags(_flags),
hierarchy(_hierarchy),
limitSwap(_limitSwap) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp b/src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp
index 2665b02..bebefbb 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp
@@ -353,7 +353,8 @@ CgroupsNetClsIsolatorProcess::CgroupsNetClsIsolatorProcess(
const string& _hierarchy,
const IntervalSet<uint32_t>& primaries,
const IntervalSet<uint32_t>& secondaries)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("cgroups-net-cls-isolator")),
+ flags(_flags),
hierarchy(_hierarchy)
{
if (!primaries.empty()) {
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/cgroups/perf_event.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/perf_event.hpp b/src/slave/containerizer/mesos/isolators/cgroups/perf_event.hpp
index 1de3849..4abde12 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/perf_event.hpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/perf_event.hpp
@@ -19,6 +19,7 @@
#include <set>
+#include <process/id.hpp>
#include <process/time.hpp>
#include <stout/hashmap.hpp>
@@ -65,7 +66,8 @@ private:
const Flags& _flags,
const std::string& _hierarchy,
const std::set<std::string>& _events)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("cgroups-perf-event-isolator")),
+ flags(_flags),
hierarchy(_hierarchy),
events(_events) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/docker/runtime.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/docker/runtime.cpp b/src/slave/containerizer/mesos/isolators/docker/runtime.cpp
index 5af0ae9..b589cd6 100644
--- a/src/slave/containerizer/mesos/isolators/docker/runtime.cpp
+++ b/src/slave/containerizer/mesos/isolators/docker/runtime.cpp
@@ -19,6 +19,8 @@
#include <glog/logging.h>
+#include <process/id.hpp>
+
#include <stout/error.hpp>
#include <stout/foreach.hpp>
#include <stout/stringify.hpp>
@@ -50,7 +52,8 @@ namespace slave {
DockerRuntimeIsolatorProcess::DockerRuntimeIsolatorProcess(
const Flags& _flags)
- : flags(_flags) {}
+ : ProcessBase(process::ID::generate("docker-runtime-isolator")),
+ flags(_flags) {}
DockerRuntimeIsolatorProcess::~DockerRuntimeIsolatorProcess() {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/docker/volume/isolator.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/docker/volume/isolator.cpp b/src/slave/containerizer/mesos/isolators/docker/volume/isolator.cpp
index d10c424..af9f373 100644
--- a/src/slave/containerizer/mesos/isolators/docker/volume/isolator.cpp
+++ b/src/slave/containerizer/mesos/isolators/docker/volume/isolator.cpp
@@ -15,6 +15,7 @@
// limitations under the License.
#include <process/collect.hpp>
+#include <process/id.hpp>
#include <stout/os.hpp>
@@ -50,7 +51,8 @@ DockerVolumeIsolatorProcess::DockerVolumeIsolatorProcess(
const Flags& _flags,
const string& _rootDir,
const Owned<DriverClient>& _client)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("docker-volume-isolator")),
+ flags(_flags),
rootDir(_rootDir),
client(_client) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp b/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
index afcf978..6bf9a4a 100644
--- a/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
+++ b/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
@@ -21,6 +21,7 @@
#include <glog/logging.h>
#include <process/collect.hpp>
+#include <process/id.hpp>
#include <process/metrics/metrics.hpp>
@@ -200,7 +201,8 @@ Try<Isolator*> LinuxFilesystemIsolatorProcess::create(const Flags& flags)
LinuxFilesystemIsolatorProcess::LinuxFilesystemIsolatorProcess(
const Flags& _flags)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("linux-filesystem-isolator")),
+ flags(_flags),
metrics(PID<LinuxFilesystemIsolatorProcess>(this)) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/filesystem/posix.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/filesystem/posix.cpp b/src/slave/containerizer/mesos/isolators/filesystem/posix.cpp
index 0809e8e..af427c6 100644
--- a/src/slave/containerizer/mesos/isolators/filesystem/posix.cpp
+++ b/src/slave/containerizer/mesos/isolators/filesystem/posix.cpp
@@ -17,6 +17,8 @@
#include <list>
#include <string>
+#include <process/id.hpp>
+
#include <stout/fs.hpp>
#include <stout/os.hpp>
#include <stout/path.hpp>
@@ -42,7 +44,8 @@ namespace slave {
PosixFilesystemIsolatorProcess::PosixFilesystemIsolatorProcess(
const Flags& _flags)
- : flags(_flags) {}
+ : ProcessBase(process::ID::generate("posix-filesystem-isolator")),
+ flags(_flags) {}
PosixFilesystemIsolatorProcess::~PosixFilesystemIsolatorProcess() {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/filesystem/shared.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/filesystem/shared.cpp b/src/slave/containerizer/mesos/isolators/filesystem/shared.cpp
index 51d1518..a1283e5 100644
--- a/src/slave/containerizer/mesos/isolators/filesystem/shared.cpp
+++ b/src/slave/containerizer/mesos/isolators/filesystem/shared.cpp
@@ -16,6 +16,8 @@
#include <set>
+#include <process/id.hpp>
+
#include <stout/os/strerror.hpp>
#include "linux/ns.hpp"
@@ -40,7 +42,8 @@ namespace slave {
SharedFilesystemIsolatorProcess::SharedFilesystemIsolatorProcess(
const Flags& _flags)
- : flags(_flags) {}
+ : ProcessBase(process::ID::generate("shared-filesystem-isolator")),
+ flags(_flags) {}
SharedFilesystemIsolatorProcess::~SharedFilesystemIsolatorProcess() {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/filesystem/windows.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/filesystem/windows.cpp b/src/slave/containerizer/mesos/isolators/filesystem/windows.cpp
index 0bee68b..f169c38 100644
--- a/src/slave/containerizer/mesos/isolators/filesystem/windows.cpp
+++ b/src/slave/containerizer/mesos/isolators/filesystem/windows.cpp
@@ -14,6 +14,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <process/id.hpp>
+
#include "slave/paths.hpp"
#include "slave/containerizer/mesos/isolators/filesystem/windows.hpp"
@@ -28,7 +30,8 @@ namespace slave {
WindowsFilesystemIsolatorProcess::WindowsFilesystemIsolatorProcess(
const Flags& _flags)
- : PosixFilesystemIsolatorProcess(_flags) {}
+ : ProcessBase(process::ID::generate("windows-filesystem-isolator")),
+ PosixFilesystemIsolatorProcess(_flags) {}
Try<Isolator*> WindowsFilesystemIsolatorProcess::create(const Flags& flags)
{
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/gpu/isolator.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/gpu/isolator.cpp b/src/slave/containerizer/mesos/isolators/gpu/isolator.cpp
index c7e8cf0..1383ba2 100644
--- a/src/slave/containerizer/mesos/isolators/gpu/isolator.cpp
+++ b/src/slave/containerizer/mesos/isolators/gpu/isolator.cpp
@@ -26,6 +26,7 @@
#include <process/collect.hpp>
#include <process/defer.hpp>
#include <process/future.hpp>
+#include <process/id.hpp>
#include <stout/error.hpp>
#include <stout/foreach.hpp>
@@ -77,7 +78,8 @@ NvidiaGpuIsolatorProcess::NvidiaGpuIsolatorProcess(
const NvidiaGpuAllocator& _allocator,
const NvidiaVolume& _volume,
const map<Path, cgroups::devices::Entry>& _controlDeviceEntries)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("mesos-nvidia-gpu-isolator")),
+ flags(_flags),
hierarchy(_hierarchy),
allocator(_allocator),
volume(_volume),
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/namespaces/pid.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/namespaces/pid.hpp b/src/slave/containerizer/mesos/isolators/namespaces/pid.hpp
index 4e0dcd1..1c74ba2 100644
--- a/src/slave/containerizer/mesos/isolators/namespaces/pid.hpp
+++ b/src/slave/containerizer/mesos/isolators/namespaces/pid.hpp
@@ -21,6 +21,8 @@
#include <string>
+#include <process/id.hpp>
+
#include <stout/result.hpp>
#include "slave/flags.hpp"
@@ -50,7 +52,8 @@ public:
// subsequently restarted with namespaces/pid enabled.
static Result<ino_t> getNamespace(const ContainerID& container);
- NamespacesPidIsolatorProcess() {}
+ NamespacesPidIsolatorProcess()
+ : ProcessBase(process::ID::generate("mesos-pid-isolator")) {}
virtual ~NamespacesPidIsolatorProcess() {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/network/cni/cni.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/network/cni/cni.hpp b/src/slave/containerizer/mesos/isolators/network/cni/cni.hpp
index 527c579..eea8035 100644
--- a/src/slave/containerizer/mesos/isolators/network/cni/cni.hpp
+++ b/src/slave/containerizer/mesos/isolators/network/cni/cni.hpp
@@ -17,6 +17,7 @@
#ifndef __NETWORK_CNI_ISOLATOR_HPP__
#define __NETWORK_CNI_ISOLATOR_HPP__
+#include <process/id.hpp>
#include <process/subprocess.hpp>
#include <stout/subcommand.hpp>
@@ -114,7 +115,8 @@ private:
const hashmap<std::string, NetworkConfigInfo>& _networkConfigs,
const Option<std::string>& _rootDir = None(),
const Option<std::string>& _pluginDir = None())
- : flags(_flags),
+ : ProcessBase(process::ID::generate("mesos-network-cni-isolator")),
+ flags(_flags),
networkConfigs(_networkConfigs),
rootDir(_rootDir),
pluginDir(_pluginDir) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp b/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp
index 21a86e3..e852c46 100644
--- a/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp
+++ b/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp
@@ -25,6 +25,7 @@
#include <string>
#include <vector>
+#include <process/id.hpp>
#include <process/owned.hpp>
#include <process/subprocess.hpp>
@@ -260,7 +261,8 @@ private:
const IntervalSet<uint16_t>& _managedNonEphemeralPorts,
const process::Owned<EphemeralPortsAllocator>& _ephemeralPortsAllocator,
const std::set<uint16_t>& _flowIDs)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("mesos-port-mapping-isolator")),
+ flags(_flags),
bindMountRoot(_bindMountRoot),
eth0(_eth0),
lo(_lo),
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/posix.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/posix.hpp b/src/slave/containerizer/mesos/isolators/posix.hpp
index e5cee9c..26c693a 100644
--- a/src/slave/containerizer/mesos/isolators/posix.hpp
+++ b/src/slave/containerizer/mesos/isolators/posix.hpp
@@ -18,6 +18,7 @@
#define __POSIX_ISOLATOR_HPP__
#include <process/future.hpp>
+#include <process/id.hpp>
#include <stout/hashmap.hpp>
#include <stout/os.hpp>
@@ -165,7 +166,8 @@ public:
}
protected:
- PosixCpuIsolatorProcess() {}
+ PosixCpuIsolatorProcess()
+ : ProcessBase(process::ID::generate("posix-cpu-isolator")) {}
};
class PosixMemIsolatorProcess : public PosixIsolatorProcess
@@ -198,7 +200,8 @@ public:
}
protected:
- PosixMemIsolatorProcess() {}
+ PosixMemIsolatorProcess()
+ : ProcessBase(process::ID::generate("posix-mem-isolator")) {}
};
} // namespace slave {
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/posix/disk.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/posix/disk.cpp b/src/slave/containerizer/mesos/isolators/posix/disk.cpp
index 3dfe7ad..f97ace9 100644
--- a/src/slave/containerizer/mesos/isolators/posix/disk.cpp
+++ b/src/slave/containerizer/mesos/isolators/posix/disk.cpp
@@ -30,6 +30,7 @@
#include <process/collect.hpp>
#include <process/defer.hpp>
#include <process/delay.hpp>
+#include <process/id.hpp>
#include <process/io.hpp>
#include <process/subprocess.hpp>
@@ -99,7 +100,9 @@ PosixDiskIsolatorProcess::Info::PathInfo::~PathInfo()
PosixDiskIsolatorProcess::PosixDiskIsolatorProcess(const Flags& _flags)
- : flags(_flags), collector(flags.container_disk_watch_interval) {}
+ : ProcessBase(process::ID::generate("posix-disk-isolator")),
+ flags(_flags),
+ collector(flags.container_disk_watch_interval) {}
PosixDiskIsolatorProcess::~PosixDiskIsolatorProcess() {}
@@ -380,7 +383,9 @@ Future<Nothing> PosixDiskIsolatorProcess::cleanup(
class DiskUsageCollectorProcess : public Process<DiskUsageCollectorProcess>
{
public:
- DiskUsageCollectorProcess(const Duration& _interval) : interval(_interval) {}
+ DiskUsageCollectorProcess(const Duration& _interval)
+ : ProcessBase(process::ID::generate("posix-disk-usage-collector")),
+ interval(_interval) {}
virtual ~DiskUsageCollectorProcess() {}
Future<Bytes> usage(
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/windows.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/windows.hpp b/src/slave/containerizer/mesos/isolators/windows.hpp
index aec3316..b0621a5 100644
--- a/src/slave/containerizer/mesos/isolators/windows.hpp
+++ b/src/slave/containerizer/mesos/isolators/windows.hpp
@@ -18,6 +18,7 @@
#define __WINDOWS_ISOLATOR_HPP__
#include <process/future.hpp>
+#include <process/id.hpp>
#include "slave/flags.hpp"
@@ -57,7 +58,8 @@ public:
}
private:
- WindowsCpuIsolatorProcess() {}
+ WindowsCpuIsolatorProcess()
+ : ProcessBase(process::ID::generate("windows-cpu-isolator")) {}
};
@@ -78,7 +80,8 @@ public:
}
private:
- WindowsMemIsolatorProcess() {}
+ WindowsMemIsolatorProcess()
+ : ProcessBase(process::ID::generate("windows-mem-isolator")) {}
};
} // namespace slave {
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/isolators/xfs/disk.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/xfs/disk.cpp b/src/slave/containerizer/mesos/isolators/xfs/disk.cpp
index 19e5511..60e8493 100644
--- a/src/slave/containerizer/mesos/isolators/xfs/disk.cpp
+++ b/src/slave/containerizer/mesos/isolators/xfs/disk.cpp
@@ -18,6 +18,8 @@
#include <glog/logging.h>
+#include <process/id.hpp>
+
#include <stout/check.hpp>
#include <stout/foreach.hpp>
#include <stout/os.hpp>
@@ -150,7 +152,8 @@ Try<Isolator*> XfsDiskIsolatorProcess::create(const Flags& flags)
XfsDiskIsolatorProcess::XfsDiskIsolatorProcess(
const Flags& _flags,
const IntervalSet<prid_t>& projectIds)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("xfs-disk-isolator")),
+ flags(_flags),
totalProjectIds(projectIds),
freeProjectIds(projectIds)
{
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/provisioner/appc/store.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/provisioner/appc/store.cpp b/src/slave/containerizer/mesos/provisioner/appc/store.cpp
index c27b1b5..e63ae41 100644
--- a/src/slave/containerizer/mesos/provisioner/appc/store.cpp
+++ b/src/slave/containerizer/mesos/provisioner/appc/store.cpp
@@ -21,6 +21,7 @@
#include <process/collect.hpp>
#include <process/defer.hpp>
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <stout/check.hpp>
#include <stout/hashmap.hpp>
@@ -163,7 +164,8 @@ StoreProcess::StoreProcess(
const string& _rootDir,
Owned<Cache> _cache,
Owned<Fetcher> _fetcher)
- : rootDir(_rootDir),
+ : ProcessBase(process::ID::generate("appc-provisioner-store")),
+ rootDir(_rootDir),
cache(_cache),
fetcher(_fetcher) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/provisioner/backends/aufs.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/provisioner/backends/aufs.cpp b/src/slave/containerizer/mesos/provisioner/backends/aufs.cpp
index 54c0057..4c5cdb6 100644
--- a/src/slave/containerizer/mesos/provisioner/backends/aufs.cpp
+++ b/src/slave/containerizer/mesos/provisioner/backends/aufs.cpp
@@ -15,6 +15,7 @@
// limitations under the License.
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <process/process.hpp>
#include <stout/adaptor.hpp>
@@ -45,6 +46,9 @@ namespace slave {
class AufsBackendProcess : public Process<AufsBackendProcess>
{
public:
+ AufsBackendProcess()
+ : ProcessBase(process::ID::generate("aufs-provisioner-backend")) {}
+
Future<Nothing> provision(
const vector<string>& layers,
const string& rootfs,
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/provisioner/backends/bind.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/provisioner/backends/bind.cpp b/src/slave/containerizer/mesos/provisioner/backends/bind.cpp
index af9544e..62ccaec 100644
--- a/src/slave/containerizer/mesos/provisioner/backends/bind.cpp
+++ b/src/slave/containerizer/mesos/provisioner/backends/bind.cpp
@@ -19,6 +19,7 @@
#include <unistd.h>
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <process/process.hpp>
#include <process/metrics/counter.hpp>
@@ -43,6 +44,9 @@ namespace slave {
class BindBackendProcess : public Process<BindBackendProcess>
{
public:
+ BindBackendProcess()
+ : ProcessBase(process::ID::generate("bind-provisioner-backend")) {}
+
Future<Nothing> provision(const vector<string>& layers, const string& rootfs);
Future<bool> destroy(const string& rootfs);
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/provisioner/backends/copy.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/provisioner/backends/copy.cpp b/src/slave/containerizer/mesos/provisioner/backends/copy.cpp
index b9f6d7a..e57bb3d 100644
--- a/src/slave/containerizer/mesos/provisioner/backends/copy.cpp
+++ b/src/slave/containerizer/mesos/provisioner/backends/copy.cpp
@@ -19,6 +19,7 @@
#include <process/collect.hpp>
#include <process/defer.hpp>
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <process/io.hpp>
#include <process/process.hpp>
#include <process/subprocess.hpp>
@@ -45,6 +46,9 @@ namespace slave {
class CopyBackendProcess : public Process<CopyBackendProcess>
{
public:
+ CopyBackendProcess()
+ : ProcessBase(process::ID::generate("copy-provisioner-backend")) {}
+
Future<Nothing> provision(const vector<string>& layers, const string& rootfs);
Future<bool> destroy(const string& rootfs);
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/provisioner/backends/overlay.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/provisioner/backends/overlay.cpp b/src/slave/containerizer/mesos/provisioner/backends/overlay.cpp
index e3d8494..e20cd48 100644
--- a/src/slave/containerizer/mesos/provisioner/backends/overlay.cpp
+++ b/src/slave/containerizer/mesos/provisioner/backends/overlay.cpp
@@ -15,6 +15,7 @@
// limitations under the License.
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <process/process.hpp>
#include <stout/adaptor.hpp>
@@ -45,6 +46,9 @@ namespace slave {
class OverlayBackendProcess : public Process<OverlayBackendProcess>
{
public:
+ OverlayBackendProcess()
+ : ProcessBase(process::ID::generate("overlay-provisioner-backend")) {}
+
Future<Nothing> provision(
const vector<string>& layers,
const string& rootfs,
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/provisioner/docker/local_puller.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/provisioner/docker/local_puller.cpp b/src/slave/containerizer/mesos/provisioner/docker/local_puller.cpp
index 4be26fa..9b09dca 100644
--- a/src/slave/containerizer/mesos/provisioner/docker/local_puller.cpp
+++ b/src/slave/containerizer/mesos/provisioner/docker/local_puller.cpp
@@ -27,6 +27,7 @@
#include <process/collect.hpp>
#include <process/defer.hpp>
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <process/process.hpp>
#include "common/command_utils.hpp"
@@ -51,7 +52,8 @@ class LocalPullerProcess : public Process<LocalPullerProcess>
{
public:
LocalPullerProcess(const string& _archivesDir)
- : archivesDir(_archivesDir) {}
+ : ProcessBase(process::ID::generate("docker-provisioner-local-puller")),
+ archivesDir(_archivesDir) {}
~LocalPullerProcess() {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp b/src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp
index 6545a6d..1e2cc2d 100644
--- a/src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp
+++ b/src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp
@@ -151,7 +151,8 @@ RegistryPullerProcess::RegistryPullerProcess(
const string& _storeDir,
const http::URL& _defaultRegistryUrl,
const Shared<uri::Fetcher>& _fetcher)
- : storeDir(_storeDir),
+ : ProcessBase(process::ID::generate("docker-provisioner-registry-puller")),
+ storeDir(_storeDir),
defaultRegistryUrl(_defaultRegistryUrl),
fetcher(_fetcher) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/provisioner/docker/store.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/provisioner/docker/store.cpp b/src/slave/containerizer/mesos/provisioner/docker/store.cpp
index 81e9d94..52b9ea9 100644
--- a/src/slave/containerizer/mesos/provisioner/docker/store.cpp
+++ b/src/slave/containerizer/mesos/provisioner/docker/store.cpp
@@ -26,6 +26,7 @@
#include <process/collect.hpp>
#include <process/defer.hpp>
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <mesos/docker/spec.hpp>
@@ -56,7 +57,8 @@ public:
const Flags& _flags,
const Owned<MetadataManager>& _metadataManager,
const Owned<Puller>& _puller)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("docker-provisioner-store")),
+ flags(_flags),
metadataManager(_metadataManager),
puller(_puller) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/containerizer/mesos/provisioner/provisioner.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/provisioner/provisioner.cpp b/src/slave/containerizer/mesos/provisioner/provisioner.cpp
index 40ee1da..6fc5652 100644
--- a/src/slave/containerizer/mesos/provisioner/provisioner.cpp
+++ b/src/slave/containerizer/mesos/provisioner/provisioner.cpp
@@ -154,7 +154,8 @@ ProvisionerProcess::ProvisionerProcess(
const string& _rootDir,
const hashmap<Image::Type, Owned<Store>>& _stores,
const hashmap<string, Owned<Backend>>& _backends)
- : flags(_flags),
+ : ProcessBase(process::ID::generate("mesos-provisioner")),
+ flags(_flags),
rootDir(_rootDir),
stores(_stores),
backends(_backends) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/gc.hpp
----------------------------------------------------------------------
diff --git a/src/slave/gc.hpp b/src/slave/gc.hpp
index 294b75f..9a09e7b 100644
--- a/src/slave/gc.hpp
+++ b/src/slave/gc.hpp
@@ -21,6 +21,7 @@
#include <vector>
#include <process/future.hpp>
+#include <process/id.hpp>
#include <process/owned.hpp>
#include <process/process.hpp>
#include <process/timeout.hpp>
@@ -86,6 +87,9 @@ class GarbageCollectorProcess :
public process::Process<GarbageCollectorProcess>
{
public:
+ GarbageCollectorProcess()
+ : ProcessBase(process::ID::generate("agent-garbage-collector")) {}
+
virtual ~GarbageCollectorProcess();
process::Future<Nothing> schedule(
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/qos_controllers/load.cpp
----------------------------------------------------------------------
diff --git a/src/slave/qos_controllers/load.cpp b/src/slave/qos_controllers/load.cpp
index abc98fa..a241ef3 100644
--- a/src/slave/qos_controllers/load.cpp
+++ b/src/slave/qos_controllers/load.cpp
@@ -22,6 +22,7 @@
#include <process/defer.hpp>
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <process/owned.hpp>
#include <process/process.hpp>
@@ -57,7 +58,8 @@ public:
const lambda::function<Try<os::Load>()>& _loadAverage,
const Option<double>& _loadThreshold5Min,
const Option<double>& _loadThreshold15Min)
- : usage(_usage),
+ : ProcessBase(process::ID::generate("qos-load-controller")),
+ usage(_usage),
loadAverage(_loadAverage),
loadThreshold5Min(_loadThreshold5Min),
loadThreshold15Min(_loadThreshold15Min) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/qos_controllers/noop.cpp
----------------------------------------------------------------------
diff --git a/src/slave/qos_controllers/noop.cpp b/src/slave/qos_controllers/noop.cpp
index 38b73bc..b398bd7 100644
--- a/src/slave/qos_controllers/noop.cpp
+++ b/src/slave/qos_controllers/noop.cpp
@@ -15,6 +15,7 @@
// limitations under the License.
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <process/process.hpp>
#include <stout/error.hpp>
@@ -36,7 +37,8 @@ class NoopQoSControllerProcess : public Process<NoopQoSControllerProcess>
public:
virtual ~NoopQoSControllerProcess() {}
- NoopQoSControllerProcess() {}
+ NoopQoSControllerProcess()
+ : ProcessBase(process::ID::generate("qos-noop-controller")) {}
};
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/resource_estimators/fixed.cpp
----------------------------------------------------------------------
diff --git a/src/slave/resource_estimators/fixed.cpp b/src/slave/resource_estimators/fixed.cpp
index 767ba6a..2c1268c 100644
--- a/src/slave/resource_estimators/fixed.cpp
+++ b/src/slave/resource_estimators/fixed.cpp
@@ -20,6 +20,7 @@
#include <process/defer.hpp>
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <process/owned.hpp>
#include <process/process.hpp>
@@ -40,7 +41,8 @@ public:
FixedResourceEstimatorProcess(
const lambda::function<Future<ResourceUsage>()>& _usage,
const Resources& _totalRevocable)
- : usage(_usage),
+ : ProcessBase(process::ID::generate("fixed-resource-estimator")),
+ usage(_usage),
totalRevocable(_totalRevocable) {}
Future<Resources> oversubscribable()
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/slave/resource_estimators/noop.cpp
----------------------------------------------------------------------
diff --git a/src/slave/resource_estimators/noop.cpp b/src/slave/resource_estimators/noop.cpp
index ffc9a3e..5555c3d 100644
--- a/src/slave/resource_estimators/noop.cpp
+++ b/src/slave/resource_estimators/noop.cpp
@@ -15,6 +15,7 @@
// limitations under the License.
#include <process/dispatch.hpp>
+#include <process/id.hpp>
#include <process/process.hpp>
#include <stout/error.hpp>
@@ -31,6 +32,9 @@ class NoopResourceEstimatorProcess :
public Process<NoopResourceEstimatorProcess>
{
public:
+ NoopResourceEstimatorProcess()
+ : ProcessBase(process::ID::generate("noop-resource-estimator")) {}
+
Future<Resources> oversubscribable()
{
return Resources();
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/state/in_memory.cpp
----------------------------------------------------------------------
diff --git a/src/state/in_memory.cpp b/src/state/in_memory.cpp
index c16637d..2539b4f 100644
--- a/src/state/in_memory.cpp
+++ b/src/state/in_memory.cpp
@@ -22,6 +22,7 @@
#include <process/dispatch.hpp>
#include <process/future.hpp>
+#include <process/id.hpp>
#include <process/process.hpp>
#include <stout/hashmap.hpp>
@@ -43,6 +44,9 @@ namespace state {
class InMemoryStorageProcess : public Process<InMemoryStorageProcess>
{
public:
+ InMemoryStorageProcess()
+ : ProcessBase(process::ID::generate("in-memory-storage")) {}
+
Option<Entry> get(const string& name)
{
return entries.get(name);
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/state/leveldb.cpp
----------------------------------------------------------------------
diff --git a/src/state/leveldb.cpp b/src/state/leveldb.cpp
index 7f8a1d2..5719265 100644
--- a/src/state/leveldb.cpp
+++ b/src/state/leveldb.cpp
@@ -28,6 +28,7 @@
#include <process/dispatch.hpp>
#include <process/future.hpp>
+#include <process/id.hpp>
#include <process/process.hpp>
#include <stout/error.hpp>
@@ -78,7 +79,9 @@ private:
LevelDBStorageProcess::LevelDBStorageProcess(const string& _path)
- : path(_path), db(nullptr) {}
+ : ProcessBase(process::ID::generate("leveldb-storage")),
+ path(_path),
+ db(nullptr) {}
LevelDBStorageProcess::~LevelDBStorageProcess()
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/state/log.cpp
----------------------------------------------------------------------
diff --git a/src/state/log.cpp b/src/state/log.cpp
index 1513c2a..b713839 100644
--- a/src/state/log.cpp
+++ b/src/state/log.cpp
@@ -29,6 +29,7 @@
#include <process/defer.hpp>
#include <process/dispatch.hpp>
#include <process/future.hpp>
+#include <process/id.hpp>
#include <process/mutex.hpp>
#include <process/process.hpp>
@@ -222,7 +223,8 @@ private:
LogStorageProcess::LogStorageProcess(Log* log, size_t diffsBetweenSnapshots)
- : reader(log),
+ : ProcessBase(process::ID::generate("log-storage")),
+ reader(log),
writer(log),
diffsBetweenSnapshots(diffsBetweenSnapshots) {}
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/state/zookeeper.cpp
----------------------------------------------------------------------
diff --git a/src/state/zookeeper.cpp b/src/state/zookeeper.cpp
index 9b37204..9941f6b 100644
--- a/src/state/zookeeper.cpp
+++ b/src/state/zookeeper.cpp
@@ -32,6 +32,7 @@
#include <process/dispatch.hpp>
#include <process/future.hpp>
+#include <process/id.hpp>
#include <process/process.hpp>
#include <stout/duration.hpp>
@@ -179,7 +180,8 @@ ZooKeeperStorageProcess::ZooKeeperStorageProcess(
const Duration& _timeout,
const string& _znode,
const Option<Authentication>& _auth)
- : servers(_servers),
+ : ProcessBase(process::ID::generate("zookeeper-storage")),
+ servers(_servers),
timeout(_timeout),
znode(strings::remove(_znode, "/", strings::SUFFIX)),
auth(_auth),
http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/uri/fetchers/docker.cpp
----------------------------------------------------------------------
diff --git a/src/uri/fetchers/docker.cpp b/src/uri/fetchers/docker.cpp
index 211be6f..72f70b8 100644
--- a/src/uri/fetchers/docker.cpp
+++ b/src/uri/fetchers/docker.cpp
@@ -23,6 +23,7 @@
#include <process/collect.hpp>
#include <process/dispatch.hpp>
#include <process/http.hpp>
+#include <process/id.hpp>
#include <process/io.hpp>
#include <process/process.hpp>
#include <process/subprocess.hpp>
@@ -278,7 +279,8 @@ class DockerFetcherPluginProcess : public Process<DockerFetcherPluginProcess>
public:
DockerFetcherPluginProcess(
const hashmap<string, spec::Config::Auth>& _auths)
- : auths(_auths) {}
+ : ProcessBase(process::ID::generate("docker-fetcher-plugin")),
+ auths(_auths) {}
Future<Nothing> fetch(const URI& uri, const string& directory);