本文整理汇总了C++中TaskStatus::data方法的典型用法代码示例。如果您正苦于以下问题:C++ TaskStatus::data方法的具体用法?C++ TaskStatus::data怎么用?C++ TaskStatus::data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TaskStatus
的用法示例。
在下文中一共展示了TaskStatus::data方法的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();
}
示例2: statusUpdate
virtual void statusUpdate(
SchedulerDriver* driver,
const TaskStatus& status)
{
CHECK_EQ(name, status.task_id().value());
cout << "Received status update " << status.state()
<< " for task " << status.task_id() << endl;
cout << "RECEIVED UPDATE:" << endl;
cout << "Message: " << status.message() << endl;
if(status.state() == TASK_FINISHED) {
m_response_payload = std::string(status.data());
cout << "=== Dumping data ===" << endl;
cout << status.data() << endl;
cout << "====================" << endl;
}
if (mesos::internal::protobuf::isTerminalState(status.state())) {
driver->stop();
}
}