当前位置: 首页>>代码示例>>C++>>正文


C++ ExecutorInfo::resources方法代码示例

本文整理汇总了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();
}
开发者ID:lukeleslie,项目名称:mesos,代码行数:12,代码来源:type_utils.cpp

示例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()));
}
开发者ID:WuErPing,项目名称:mesos,代码行数:15,代码来源:type_utils.hpp

示例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(); });
}
开发者ID:chrisliu529,项目名称:mesos,代码行数:28,代码来源:posix.cpp

示例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();
  }
开发者ID:ash211,项目名称:mesos-1,代码行数:9,代码来源:master.hpp

示例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();
  }
开发者ID:HaiyangWang,项目名称:mesos,代码行数:10,代码来源:master.hpp


注:本文中的ExecutorInfo::resources方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。