예제 #1
0
void CephSchedulerAgent<T>::registered(
      T* driver,
      const FrameworkID& frameworkId,
      const MasterInfo& masterInfo)
{
  LOG(INFO) << "Registered! FrameworkID=" << frameworkId.value();
}
예제 #2
0
파일: http.cpp 프로젝트: himgod/mesos
// 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));
  }
예제 #3
0
파일: mesos.hpp 프로젝트: albertleecn/mesos
inline bool operator==(const FrameworkID& left, const FrameworkID& right)
{
  return left.value() == right.value();
}
예제 #4
0
파일: mesos.hpp 프로젝트: albertleecn/mesos
inline bool operator==(const FrameworkID& left, const std::string& right)
{
  return left.value() == right;
}
예제 #5
0
inline std::size_t hash_value(const FrameworkID& frameworkId)
{
  size_t seed = 0;
  boost::hash_combine(seed, frameworkId.value());
  return seed;
}