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

Method reregisterExecutor

src/slave/slave.cpp:5653–5849  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5651
5652
5653void Slave::reregisterExecutor(
5654 const UPID& from,
5655 const FrameworkID& frameworkId,
5656 const ExecutorID& executorId,
5657 const vector<TaskInfo>& tasks,
5658 const vector<StatusUpdate>& updates)
5659{
5660 CHECK(state == RECOVERING || state == DISCONNECTED ||
5661 state == RUNNING || state == TERMINATING)
5662 << state;
5663
5664 LOG(INFO) << "Received re-registration message from"
5665 << " executor '" << executorId << "'"
5666 << " of framework " << frameworkId;
5667
5668 if (state == TERMINATING) {
5669 LOG(WARNING) << "Shutting down executor '" << executorId << "'"
5670 << " of framework " << frameworkId
5671 << " because the agent is terminating";
5672
5673 reply(ShutdownExecutorMessage());
5674 return;
5675 }
5676
5677 if (!frameworks.contains(frameworkId)) {
5678 LOG(WARNING) << "Shutting down executor '" << executorId << "'"
5679 << " of framework " << frameworkId
5680 << " because the framework is unknown";
5681
5682 reply(ShutdownExecutorMessage());
5683 return;
5684 }
5685
5686 Framework* framework = frameworks.at(frameworkId);
5687
5688 CHECK(framework->state == Framework::RUNNING ||
5689 framework->state == Framework::TERMINATING)
5690 << framework->state;
5691
5692 if (framework->state == Framework::TERMINATING) {
5693 LOG(WARNING) << "Shutting down executor '" << executorId << "'"
5694 << " of framework " << frameworkId
5695 << " because the framework is terminating";
5696
5697 reply(ShutdownExecutorMessage());
5698 return;
5699 }
5700
5701 Executor* executor = framework->getExecutor(executorId);
5702
5703 if (executor == nullptr) {
5704 LOG(WARNING) << "Shutting down unknown executor '" << executorId << "'"
5705 << " of framework " << frameworkId;
5706
5707 reply(ShutdownExecutorMessage());
5708 return;
5709 }
5710

Callers

nothing calls this directly

Calls 15

deferFunction · 0.85
frameworkHasCapabilityFunction · 0.85
createStatusUpdateFunction · 0.85
randomFunction · 0.85
atMethod · 0.80
getExecutorMethod · 0.80
MergeFromMethod · 0.80
allocatedResourcesMethod · 0.80
everSentTaskMethod · 0.80
foreachFunction · 0.70
sendFunction · 0.50
UPIDClass · 0.50

Tested by

no test coverage detected