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

Method checkpointExecutor

src/slave/slave.cpp:11074–11101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11072
11073
11074void Executor::checkpointExecutor()
11075{
11076 CHECK(checkpoint);
11077
11078 // Checkpoint the executor info.
11079 const string path = paths::getExecutorInfoPath(
11080 slave->metaDir, slave->info.id(), frameworkId, id);
11081
11082 VLOG(1) << "Checkpointing ExecutorInfo to '" << path << "'";
11083
11084 CHECK_SOME(state::checkpoint(path, info));
11085
11086 // Sync state of sentinel indicating whether the executor was
11087 // generated by the agent.
11088 CHECK_SOME(state::checkpoint(
11089 paths::getExecutorGeneratedForCommandTaskPath(
11090 slave->metaDir, slave->info.id(), frameworkId, id),
11091 stringify(static_cast<int>(isGeneratedForCommandTask_)),
11092 true));
11093
11094
11095 // Create the meta executor directory.
11096 // NOTE: This creates the 'latest' symlink in the meta directory.
11097 Try<string> mkdir = paths::createExecutorDirectory(
11098 slave->metaDir, slave->info.id(), frameworkId, id, containerId);
11099
11100 CHECK_SOME(mkdir);
11101}
11102
11103
11104void Executor::checkpointTask(const TaskInfo& task)

Callers 2

addExecutorMethod · 0.45
recoverExecutorMethod · 0.45

Calls 6

getExecutorInfoPathFunction · 0.85
checkpointFunction · 0.85
createExecutorDirectoryFunction · 0.85
stringifyFunction · 0.50
idMethod · 0.45

Tested by

no test coverage detected