From commits-return-19670-archive-asf-public=cust-asf.ponee.io@mesos.apache.org Thu Jan 4 13:48:16 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id DA85718077B for ; Thu, 4 Jan 2018 13:48:16 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CA7A8160C28; Thu, 4 Jan 2018 12:48:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9EF25160C2B for ; Thu, 4 Jan 2018 13:48:14 +0100 (CET) Received: (qmail 13324 invoked by uid 500); 4 Jan 2018 12:48:13 -0000 Mailing-List: contact commits-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list commits@mesos.apache.org Received: (qmail 13305 invoked by uid 99); 4 Jan 2018 12:48:13 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jan 2018 12:48:13 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 21B6AE01EC; Thu, 4 Jan 2018 12:48:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: git-site-role@apache.org To: commits@mesos.apache.org Date: Thu, 04 Jan 2018 12:48:10 -0000 Message-Id: <81cc8ec9430a4f7f84aeb74a988b3924@git.apache.org> In-Reply-To: <203dea23e1a3443293d71c155f80fc33@git.apache.org> References: <203dea23e1a3443293d71c155f80fc33@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/3] mesos-site git commit: Updated the website built from mesos SHA: a1a7c6f. http://git-wip-us.apache.org/repos/asf/mesos-site/blob/ac81e2f9/content/api/latest/c++/src_2master_2master_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/src_2master_2master_8hpp_source.html b/content/api/latest/c++/src_2master_2master_8hpp_source.html index de64969..6307a8f 100644 --- a/content/api/latest/c++/src_2master_2master_8hpp_source.html +++ b/content/api/latest/c++/src_2master_2master_8hpp_source.html @@ -230,2691 +230,2692 @@
176 
177  void apply(const std::vector<ResourceConversion>& conversions);
178 
- +
180  const SlaveInfo& info,
181  const std::string& _version,
182  const std::vector<SlaveInfo::Capability>& _capabilites,
-
183  const Option<id::UUID>& resourceVersion);
-
184 
-
185  Master* const master;
-
186  const SlaveID id;
-
187  SlaveInfo info;
-
188 
-
189  const MachineID machineId;
-
190 
- -
192 
-
193  // TODO(bmahler): Use stout's Version when it can parse labels, etc.
-
194  std::string version;
-
195 
-
196  // Agent capabilities.
- -
198 
- - -
201 
-
202  // Slave becomes disconnected when the socket closes.
-
203  bool connected;
-
204 
-
205  // Slave becomes deactivated when it gets disconnected. In the
-
206  // future this might also happen via HTTP endpoint.
-
207  // No offers will be made for a deactivated slave.
-
208  bool active;
-
209 
-
210  // Timer for marking slaves unreachable that become disconnected and
-
211  // don't re-register. This timeout is larger than the slave
-
212  // observer's timeout, so typically the slave observer will be the
-
213  // one to mark such slaves unreachable; this timer is a backup for
-
214  // when a slave responds to pings but does not re-register (e.g.,
-
215  // because agent recovery has hung).
- -
217 
-
218  // Executors running on this slave.
-
219  //
-
220  // TODO(bmahler): Make this private to enforce that `addExecutor()`
-
221  // and `removeExecutor()` are used, and provide a const view into
-
222  // the executors.
- -
224 
-
225  // Tasks that have not yet been launched because they are currently
-
226  // being authorized. This is similar to Framework's pendingTasks but we
-
227  // track pendingTasks per agent separately to determine if any offer
-
228  // operation for this agent would change resources requested by these tasks.
- -
230 
-
231  // Tasks present on this slave.
-
232  //
-
233  // TODO(bmahler): Make this private to enforce that `addTask()` and
-
234  // `removeTask()` are used, and provide a const view into the tasks.
-
235  //
-
236  // TODO(bmahler): The task pointer ownership complexity arises from the fact
-
237  // that we own the pointer here, but it's shared with the Framework struct.
-
238  // We should find a way to eliminate this.
- -
240 
-
241  // Tasks that were asked to kill by frameworks.
-
242  // This is used for reconciliation when the slave re-registers.
- -
244 
-
245  // Pending operations or terminal operations that have
-
246  // unacknowledged status updates on this agent.
- -
248 
-
249  // Active offers on this slave.
- -
251 
-
252  // Active inverse offers on this slave.
- -
254 
-
255  // Resources for active task / executors / operations.
-
256  // Note that we maintain multiple copies of each shared resource in
-
257  // `usedResources` as they are used by multiple tasks.
- -
259 
- -
261 
-
262  // Resources that should be checkpointed by the slave (e.g.,
-
263  // persistent volumes, dynamic reservations, etc). These are either
-
264  // in use by a task/executor, or are available for use and will be
-
265  // re-offered to the framework.
-
266  // TODO(jieyu): `checkpointedResources` is only for agent default
-
267  // resources. Resources from resource providers are not included in
-
268  // this field. Consider removing this field.
- -
270 
-
271  // The current total resources of the slave. Note that this is
-
272  // different from 'info.resources()' because this also considers
-
273  // operations (e.g., CREATE, RESERVE) that have been applied and
-
274  // includes revocable resources and resources from resource
-
275  // providers as well.
- -
277 
-
278  SlaveObserver* observer;
-
279 
- - -
282 
-
283 private:
-
284  Slave(const Slave&); // No copying.
-
285  Slave& operator=(const Slave&); // No assigning.
-
286 };
-
287 
+
183  const Resources& _checkpointedResources,
+
184  const Option<id::UUID>& resourceVersion);
+
185 
+
186  Master* const master;
+
187  const SlaveID id;
+
188  SlaveInfo info;
+
189 
+
190  const MachineID machineId;
+
191 
+ +
193 
+
194  // TODO(bmahler): Use stout's Version when it can parse labels, etc.
+
195  std::string version;
+
196 
+
197  // Agent capabilities.
+ +
199 
+ + +
202 
+
203  // Slave becomes disconnected when the socket closes.
+
204  bool connected;
+
205 
+
206  // Slave becomes deactivated when it gets disconnected. In the
+
207  // future this might also happen via HTTP endpoint.
+
208  // No offers will be made for a deactivated slave.
+
209  bool active;
+
210 
+
211  // Timer for marking slaves unreachable that become disconnected and
+
212  // don't re-register. This timeout is larger than the slave
+
213  // observer's timeout, so typically the slave observer will be the
+
214  // one to mark such slaves unreachable; this timer is a backup for
+
215  // when a slave responds to pings but does not re-register (e.g.,
+
216  // because agent recovery has hung).
+ +
218 
+
219  // Executors running on this slave.
+
220  //
+
221  // TODO(bmahler): Make this private to enforce that `addExecutor()`
+
222  // and `removeExecutor()` are used, and provide a const view into
+
223  // the executors.
+ +
225 
+
226  // Tasks that have not yet been launched because they are currently
+
227  // being authorized. This is similar to Framework's pendingTasks but we
+
228  // track pendingTasks per agent separately to determine if any offer
+
229  // operation for this agent would change resources requested by these tasks.
+ +
231 
+
232  // Tasks present on this slave.
+
233  //
+
234  // TODO(bmahler): Make this private to enforce that `addTask()` and
+
235  // `removeTask()` are used, and provide a const view into the tasks.
+
236  //
+
237  // TODO(bmahler): The task pointer ownership complexity arises from the fact
+
238  // that we own the pointer here, but it's shared with the Framework struct.
+
239  // We should find a way to eliminate this.
+ +
241 
+
242  // Tasks that were asked to kill by frameworks.
+
243  // This is used for reconciliation when the slave re-registers.
+ +
245 
+
246  // Pending operations or terminal operations that have
+
247  // unacknowledged status updates on this agent.
+ +
249 
+
250  // Active offers on this slave.
+ +
252 
+
253  // Active inverse offers on this slave.
+ +
255 
+
256  // Resources for active task / executors / operations.
+
257  // Note that we maintain multiple copies of each shared resource in
+
258  // `usedResources` as they are used by multiple tasks.
+ +
260 
+ +
262 
+
263  // Resources that should be checkpointed by the slave (e.g.,
+
264  // persistent volumes, dynamic reservations, etc). These are either
+
265  // in use by a task/executor, or are available for use and will be
+
266  // re-offered to the framework.
+
267  // TODO(jieyu): `checkpointedResources` is only for agent default
+
268  // resources. Resources from resource providers are not included in
+
269  // this field. Consider removing this field.
+ +
271 
+
272  // The current total resources of the slave. Note that this is
+
273  // different from 'info.resources()' because this also considers
+
274  // operations (e.g., CREATE, RESERVE) that have been applied and
+
275  // includes revocable resources and resources from resource
+
276  // providers as well.
+ +
278 
+
279  SlaveObserver* observer;
+
280 
+ + +
283 
+
284 private:
+
285  Slave(const Slave&); // No copying.
+
286  Slave& operator=(const Slave&); // No assigning.
+
287 };
288 
-
289 inline std::ostream& operator<<(std::ostream& stream, const Slave& slave)
-
290 {
-
291  return stream << slave.id << " at " << slave.pid
-
292  << " (" << slave.info.hostname() << ")";
-
293 }
-
294 
+
289 
+
290 inline std::ostream& operator<<(std::ostream& stream, const Slave& slave)
+
291 {
+
292  return stream << slave.id << " at " << slave.pid
+
293  << " (" << slave.info.hostname() << ")";
+
294 }
295 
-
296 // Represents the streaming HTTP connection to a framework or a client
-
297 // subscribed to the '/api/vX' endpoint.
- -
299 {
- -
301  ContentType _contentType,
-
302  id::UUID _streamId)
-
303  : writer(_writer),
-
304  contentType(_contentType),
-
305  streamId(_streamId) {}
-
306 
-
307  // We need to evolve the internal old style message/unversioned event into a
-
308  // versioned event e.g., `v1::scheduler::Event` or `v1::master::Event`.
-
309  template <typename Message, typename Event = v1::scheduler::Event>
-
310  bool send(const Message& message)
-
311  {
- -
313  serialize, contentType, lambda::_1));
-
314 
-
315  return writer.write(encoder.encode(evolve(message)));
-
316  }
-
317 
-
318  bool close()
-
319  {
-
320  return writer.close();
-
321  }
-
322 
- -
324  {
-
325  return writer.readerClosed();
-
326  }
-
327 
- - - -
331 };
-
332 
+
296 
+
297 // Represents the streaming HTTP connection to a framework or a client
+
298 // subscribed to the '/api/vX' endpoint.
+ +
300 {
+ +
302  ContentType _contentType,
+
303  id::UUID _streamId)
+
304  : writer(_writer),
+
305  contentType(_contentType),
+
306  streamId(_streamId) {}
+
307 
+
308  // We need to evolve the internal old style message/unversioned event into a
+
309  // versioned event e.g., `v1::scheduler::Event` or `v1::master::Event`.
+
310  template <typename Message, typename Event = v1::scheduler::Event>
+
311  bool send(const Message& message)
+
312  {
+ +
314  serialize, contentType, lambda::_1));
+
315 
+
316  return writer.write(encoder.encode(evolve(message)));
+
317  }
+
318 
+
319  bool close()
+
320  {
+
321  return writer.close();
+
322  }
+
323 
+ +
325  {
+
326  return writer.readerClosed();
+
327  }
+
328 
+ + + +
332 };
333 
-
334 // This process periodically sends heartbeats to a given HTTP connection.
-
335 // The `Message` template parameter is the type of the heartbeat event passed
-
336 // into the heartbeater during construction, while the `Event` template
-
337 // parameter is the versioned event type which is sent to the client.
-
338 // The optional delay parameter is used to specify the delay period before it
-
339 // sends the first heartbeat.
-
340 template <typename Message, typename Event>
-
341 class Heartbeater : public process::Process<Heartbeater<Message, Event>>
-
342 {
-
343 public:
-
344  Heartbeater(const std::string& _logMessage,
-
345  const Message& _heartbeatMessage,
-
346  const HttpConnection& _http,
-
347  const Duration& _interval,
-
348  const Option<Duration>& _delay = None())
-
349  : process::ProcessBase(process::ID::generate("heartbeater")),
-
350  logMessage(_logMessage),
-
351  heartbeatMessage(_heartbeatMessage),
-
352  http(_http),
-
353  interval(_interval),
-
354  delay(_delay) {}
-
355 
-
356 protected:
-
357  virtual void initialize() override
-
358  {
-
359  if (delay.isSome()) {
- -
361  delay.get(),
-
362  this,
- -
364  } else {
-
365  heartbeat();
-
366  }
-
367  }
-
368 
-
369 private:
-
370  void heartbeat()
-
371  {
-
372  // Only send a heartbeat if the connection is not closed.
-
373  if (http.closed().isPending()) {
-
374  VLOG(2) << "Sending heartbeat to " << logMessage;
-
375 
-
376  Message message(heartbeatMessage);
-
377  http.send<Message, Event>(message);
-
378  }
-
379 
-
380  process::delay(interval, this, &Heartbeater<Message, Event>::heartbeat);
-
381  }
-
382 
-
383  const std::string logMessage;
-
384  const Message heartbeatMessage;
-
385  HttpConnection http;
-
386  const Duration interval;
-
387  const Option<Duration> delay;
-
388 };
-
389 
+
334 
+
335 // This process periodically sends heartbeats to a given HTTP connection.
+
336 // The `Message` template parameter is the type of the heartbeat event passed
+
337 // into the heartbeater during construction, while the `Event` template
+
338 // parameter is the versioned event type which is sent to the client.
+
339 // The optional delay parameter is used to specify the delay period before it
+
340 // sends the first heartbeat.
+
341 template <typename Message, typename Event>
+
342 class Heartbeater : public process::Process<Heartbeater<Message, Event>>
+
343 {
+
344 public:
+
345  Heartbeater(const std::string& _logMessage,
+
346  const Message& _heartbeatMessage,
+
347  const HttpConnection& _http,
+
348  const Duration& _interval,
+
349  const Option<Duration>& _delay = None())
+
350  : process::ProcessBase(process::ID::generate("heartbeater")),
+
351  logMessage(_logMessage),
+
352  heartbeatMessage(_heartbeatMessage),
+
353  http(_http),
+
354  interval(_interval),
+
355  delay(_delay) {}
+
356 
+
357 protected:
+
358  virtual void initialize() override
+
359  {
+
360  if (delay.isSome()) {
+ +
362  delay.get(),
+
363  this,
+ +
365  } else {
+
366  heartbeat();
+
367  }
+
368  }
+
369 
+
370 private:
+
371  void heartbeat()
+
372  {
+
373  // Only send a heartbeat if the connection is not closed.
+
374  if (http.closed().isPending()) {
+
375  VLOG(2) << "Sending heartbeat to " << logMessage;
+
376 
+
377  Message message(heartbeatMessage);
+
378  http.send<Message, Event>(message);
+
379  }
+
380 
+
381  process::delay(interval, this, &Heartbeater<Message, Event>::heartbeat);
+
382  }
+
383 
+
384  const std::string logMessage;
+
385  const Message heartbeatMessage;
+
386  HttpConnection http;
+
387  const Duration interval;
+
388  const Option<Duration> delay;
+
389 };
390 
-
391 class Master : public ProtobufProcess<Master>
-
392 {
-
393 public:
- -
395  Registrar* registrar,
-
396  Files* files,
- - -
399  const Option<Authorizer*>& authorizer,
-
400  const Option<std::shared_ptr<process::RateLimiter>>&
-
401  slaveRemovalLimiter,
-
402  const Flags& flags = Flags());
-
403 
-
404  virtual