bool operator == (const ExecutorInfo& left, const ExecutorInfo& right) { return left.executor_id() == right.executor_id() && left.data() == right.data() && Resources(left.resources()) == Resources(right.resources()) && left.command() == right.command() && left.framework_id() == right.framework_id() && left.name() == right.name() && left.source() == right.source() && left.container() == right.container() && left.discovery() == right.discovery(); }
inline bool operator == (const ExecutorInfo& left, const ExecutorInfo& right) { return left.executor_id() == right.executor_id() && left.has_framework_id() == right.has_framework_id() && (!left.has_framework_id() || (left.framework_id() == right.framework_id())) && left.command() == right.command() && Resources(left.resources()) == Resources(right.resources()) && left.has_name() == right.has_name() && (!left.has_name() || (left.name() == right.name())) && left.has_source() == right.has_source() && (!left.has_source() || (left.source() == right.source())) && left.has_data() == right.has_data() && (!left.has_data() || (left.data() == right.data())); }
Future<Option<ContainerPrepareInfo>> PosixFilesystemIsolatorProcess::prepare( const ContainerID& containerId, const ExecutorInfo& executorInfo, const ContainerConfig& containerConfig) { if (infos.contains(containerId)) { return Failure("Container has already been prepared"); } if (executorInfo.has_container()) { CHECK_EQ(executorInfo.container().type(), ContainerInfo::MESOS); // Return failure if the container change the filesystem root // because the symlinks will become invalid in the new root. if (executorInfo.container().mesos().has_image()) { return Failure("Container root filesystems not supported"); } if (executorInfo.container().volumes().size() > 0) { return Failure("Volumes in ContainerInfo is not supported"); } } infos.put(containerId, Owned<Info>(new Info(containerConfig.directory()))); return update(containerId, executorInfo.resources()) .then([]() -> Future<Option<ContainerPrepareInfo>> { return None(); }); }
void addExecutor(const FrameworkID& frameworkId, const ExecutorInfo& executorInfo) { CHECK(!hasExecutor(frameworkId, executorInfo.executor_id())); executors[frameworkId][executorInfo.executor_id()] = executorInfo; // Update the resources in use to reflect running this executor. resourcesInUse += executorInfo.resources(); }
void addExecutor(const FrameworkID& frameworkId, const ExecutorInfo& executorInfo) { CHECK(!hasExecutor(frameworkId, executorInfo.executor_id())) << "Duplicate executor " << executorInfo.executor_id() << " of framework " << frameworkId; executors[frameworkId][executorInfo.executor_id()] = executorInfo; usedResources[frameworkId] += executorInfo.resources(); }