本文整理汇总了C++中ExecutorInfo::resources方法的典型用法代码示例。如果您正苦于以下问题:C++ ExecutorInfo::resources方法的具体用法?C++ ExecutorInfo::resources怎么用?C++ ExecutorInfo::resources使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExecutorInfo
的用法示例。
在下文中一共展示了ExecutorInfo::resources方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Resources
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();
}
示例2: Resources
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()));
}
示例3: Failure
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(); });
}
示例4: addExecutor
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();
}
示例5: addExecutor
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();
}