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

Function validateCompatibleExecutorInfo

src/master/validation.cpp:1158–1188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1156
1157
1158Option<Error> validateCompatibleExecutorInfo(
1159 const ExecutorInfo& executor,
1160 Framework* framework,
1161 Slave* slave)
1162{
1163 CHECK_NOTNULL(framework);
1164 CHECK_NOTNULL(slave);
1165
1166 const ExecutorID& executorId = executor.executor_id();
1167 Option<ExecutorInfo> executorInfo = None();
1168
1169 if (slave->hasExecutor(framework->id(), executorId)) {
1170 executorInfo =
1171 slave->executors.at(framework->id()).at(executorId);
1172 }
1173
1174 if (executorInfo.isSome() && executor != executorInfo.get()) {
1175 return Error(
1176 "ExecutorInfo is not compatible with existing ExecutorInfo"
1177 " with same ExecutorID.\n"
1178 "------------------------------------------------------------\n"
1179 "Existing ExecutorInfo:\n" +
1180 stringify(executorInfo.get()) + "\n"
1181 "------------------------------------------------------------\n"
1182 "ExecutorInfo:\n" +
1183 stringify(executor) + "\n"
1184 "------------------------------------------------------------\n");
1185 }
1186
1187 return None();
1188}
1189
1190
1191Option<Error> validateFrameworkID(

Callers

nothing calls this directly

Calls 8

NoneClass · 0.85
atMethod · 0.80
ErrorFunction · 0.50
stringifyFunction · 0.50
hasExecutorMethod · 0.45
idMethod · 0.45
isSomeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected