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

Function foreach

src/slave/state.cpp:191–205  ·  view source on GitHub ↗

Recover each of the frameworks.

Source from the content-addressed store, hash-verified

189
190 // Recover each of the frameworks.
191 foreach (const string& path, frameworks.get()) {
192 FrameworkID frameworkId;
193 frameworkId.set_value(Path(path).basename());
194
195 Try<FrameworkState> framework =
196 FrameworkState::recover(rootDir, slaveId, frameworkId, strict, rebooted);
197
198 if (framework.isError()) {
199 return Error("Failed to recover framework " + frameworkId.value() +
200 ": " + framework.error());
201 }
202
203 state.frameworks[frameworkId] = framework.get();
204 state.errors += framework->errors;
205 }
206
207 // Recover any drain state.
208 const string drainConfigPath = paths::getDrainConfigPath(rootDir, slaveId);

Callers

nothing calls this directly

Calls 10

PathClass · 0.85
recoverFunction · 0.70
errorMethod · 0.65
ErrorFunction · 0.50
realpathFunction · 0.50
basenameMethod · 0.45
isErrorMethod · 0.45
valueMethod · 0.45
getMethod · 0.45
isSomeMethod · 0.45

Tested by

no test coverage detected