MCPcopy Create free account
hub / github.com/apache/mesos / count

Method count

src/master/readonly_handler.cpp:538–558  ·  view source on GitHub ↗

Account for the state of the given task.

Source from the content-addressed store, hash-verified

536
537 // Account for the state of the given task.
538 void count(const Task& task)
539 {
540 switch (task.state()) {
541 case TASK_STAGING: { ++staging; break; }
542 case TASK_STARTING: { ++starting; break; }
543 case TASK_RUNNING: { ++running; break; }
544 case TASK_KILLING: { ++killing; break; }
545 case TASK_FINISHED: { ++finished; break; }
546 case TASK_KILLED: { ++killed; break; }
547 case TASK_FAILED: { ++failed; break; }
548 case TASK_LOST: { ++lost; break; }
549 case TASK_ERROR: { ++error; break; }
550 case TASK_DROPPED: { ++dropped; break; }
551 case TASK_UNREACHABLE: { ++unreachable; break; }
552 case TASK_GONE: { ++gone; break; }
553 case TASK_GONE_BY_OPERATOR: { ++gone_by_operator; break; }
554 case TASK_UNKNOWN: { ++unknown; break; }
555 // No default case allows for a helpful compiler error if we
556 // introduce a new state.
557 }
558 }
559
560 size_t staging;
561 size_t starting;

Callers 11

validateResourceLimitsFunction · 0.45
foreachFunction · 0.45
updateFrameworkMethod · 0.45
foreachvalueMethod · 0.45
foreachMethod · 0.45
getTaskMethod · 0.45
recoverResourcesMethod · 0.45
removeExecutorMethod · 0.45
foreachkeyFunction · 0.45

Calls 1

stateMethod · 0.45

Tested by

no test coverage detected