Пример #1
0
SchedulerDriverStatus scheduler_killTask(SchedulerPtrPair state, ErlNifBinary* taskId)
{
    assert(state.driver != NULL);
    assert(taskId != NULL);  
    TaskID taskid_pb;

    if(!deserialize<TaskID>(taskid_pb,taskId)) { return DRIVER_ABORTED; };

    MesosSchedulerDriver* driver = reinterpret_cast<MesosSchedulerDriver*> (state.driver);
    return driver->killTask(taskid_pb);
}
Пример #2
0
SchedulerDriverStatus scheduler_killTask(
    SchedulerDriverPtr driver,
    ProtobufObj* taskIdMessage)
{
  TRACE("scheduler_killTask()\n");

  MesosSchedulerDriver* mdriver =
      reinterpret_cast<MesosSchedulerDriver*>(driver);
  assert(driver != NULL);
  assert(taskIdMessage != NULL);

  TaskID taskId;
  if (!utils::deserialize<TaskID>(taskId, taskIdMessage)) {
    return DRIVER_ABORTED;
  }

  return mdriver->killTask(taskId);
}