Example #1
0
SchedulerDriverStatus scheduler_requestResources(SchedulerPtrPair state, BinaryNifArray* requests)
{
  assert(state.driver != NULL);
  assert(requests != NULL);

  vector<Request> requests_;

  if(! deserialize<Request>( requests_, requests)) {return DRIVER_ABORTED;};

  MesosSchedulerDriver* driver = reinterpret_cast<MesosSchedulerDriver*> (state.driver);
  return driver->requestResources(requests_);
}
Example #2
0
SchedulerDriverStatus scheduler_requestResources(
    SchedulerDriverPtr driver,
    ProtobufObj* requests)
{
  TRACE("scheduler_requestResources()\n");
  assert(driver != NULL);
  assert(requests != NULL);

  MesosSchedulerDriver* mdriver =
      reinterpret_cast<MesosSchedulerDriver*>(driver);

  vector<Request> requests_;
  if (!utils::deserialize<Request>(requests_, requests)) {
    return DRIVER_ABORTED;
  }

  return mdriver->requestResources(requests_);
}