void CephSchedulerAgent<T>::registered( T* driver, const FrameworkID& frameworkId, const MasterInfo& masterInfo) { LOG(INFO) << "Registered! FrameworkID=" << frameworkId.value(); }
// TODO(bmahler): Expose the executor name / source. JSON::Object model( const TaskInfo& task, const FrameworkID& frameworkId, const TaskState& state, const vector<TaskStatus>& statuses) { JSON::Object object; object.values["id"] = task.task_id().value(); object.values["name"] = task.name(); object.values["framework_id"] = frameworkId.value(); if (task.has_executor()) { object.values["executor_id"] = task.executor().executor_id().value(); } else { object.values["executor_id"] = ""; } object.values["slave_id"] = task.slave_id().value(); object.values["state"] = TaskState_Name(state); object.values["resources"] = model(task.resources()); JSON::Array array; foreach (const TaskStatus& status, statuses) { array.values.push_back(model(status)); }
inline bool operator==(const FrameworkID& left, const FrameworkID& right) { return left.value() == right.value(); }
inline bool operator==(const FrameworkID& left, const std::string& right) { return left.value() == right; }
inline std::size_t hash_value(const FrameworkID& frameworkId) { size_t seed = 0; boost::hash_combine(seed, frameworkId.value()); return seed; }