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

Method removeExecutor

src/master/master.cpp:11319–11347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11317
11318
11319void Master::removeExecutor(
11320 Slave* slave,
11321 const FrameworkID& frameworkId,
11322 const ExecutorID& executorId)
11323{
11324 CHECK_NOTNULL(slave);
11325 CHECK(slave->hasExecutor(frameworkId, executorId));
11326
11327 ExecutorInfo executor = slave->executors[frameworkId][executorId];
11328
11329 // Note that we explicitly convert from protobuf to `Resources` here
11330 // and then use the result below to avoid performance penalty for multiple
11331 // conversions and validations implied by conversion.
11332 // Conversion is safe, as resources have already passed validation.
11333 const Resources resources = executor.resources();
11334
11335 LOG(INFO) << "Removing executor '" << executorId
11336 << "' with resources " << resources
11337 << " of framework " << frameworkId << " on agent " << *slave;
11338
11339 allocator->recoverResources(frameworkId, slave->id, resources, None(), true);
11340
11341 Framework* framework = getFramework(frameworkId);
11342 if (framework != nullptr) { // The framework might not be reregistered yet.
11343 framework->removeExecutor(slave->id, executorId);
11344 }
11345
11346 slave->removeExecutor(frameworkId, executorId);
11347}
11348
11349
11350void Master::addOperation(

Callers

nothing calls this directly

Calls 6

NoneClass · 0.85
hasExecutorMethod · 0.45
resourcesMethod · 0.45
recoverResourcesMethod · 0.45
emptyMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected