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


C++ TaskStatus::uuid方法代码示例

本文整理汇总了C++中TaskStatus::uuid方法的典型用法代码示例。如果您正苦于以下问题:C++ TaskStatus::uuid方法的具体用法?C++ TaskStatus::uuid怎么用?C++ TaskStatus::uuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TaskStatus的用法示例。


在下文中一共展示了TaskStatus::uuid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

bool operator == (const TaskStatus& left, const TaskStatus& right)
{
    return left.task_id() == right.task_id() &&
           left.state() == right.state() &&
           left.data() == right.data() &&
           left.message() == right.message() &&
           left.slave_id() == right.slave_id() &&
           left.timestamp() == right.timestamp() &&
           left.executor_id() == right.executor_id() &&
           left.healthy() == right.healthy() &&
           left.source() == right.source() &&
           left.reason() == right.reason() &&
           left.uuid() == right.uuid();
}
开发者ID:lukeleslie,项目名称:mesos,代码行数:14,代码来源:type_utils.cpp

示例2: update

  void update(const TaskStatus& status)
  {
    CHECK_EQ(SUBSCRIBED, state);

    LOG(INFO)
      << "Task " << status.task_id().value()
      << " is in state " << TaskState_Name(status.state())
      << (status.has_message() ? " with message: " + status.message() : "");

    if (status.has_uuid()) {
      Call call;
      call.set_type(Call::ACKNOWLEDGE);

      CHECK(framework.has_id());
      call.mutable_framework_id()->CopyFrom(framework.id());

      Call::Acknowledge* acknowledge = call.mutable_acknowledge();
      acknowledge->mutable_agent_id()->CopyFrom(status.agent_id());
      acknowledge->mutable_task_id()->CopyFrom(status.task_id());
      acknowledge->set_uuid(status.uuid());

      mesos->send(call);
    }

    if (status.state() == TaskState::TASK_KILLED ||
        status.state() == TaskState::TASK_LOST ||
        status.state() == TaskState::TASK_FAILED ||
        status.state() == TaskState::TASK_ERROR) {
      ++metrics.abnormal_terminations;
    }
  }
开发者ID:Abhijeet-Jadhav,项目名称:mesos,代码行数:31,代码来源:long_lived_framework.cpp


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