SchedulerDriverStatus scheduler_sendFrameworkMessage(SchedulerPtrPair state, ErlNifBinary* executorId, ErlNifBinary* slaveId, const char* data) { assert(state.driver != NULL); assert(executorId != NULL); assert(slaveId != NULL); assert(data != NULL); ExecutorID executorid_pb; SlaveID slaveid_pb; if(!deserialize<ExecutorID>(executorid_pb,executorId)) { return DRIVER_ABORTED; }; if(!deserialize<SlaveID>(slaveid_pb,slaveId)) { return DRIVER_ABORTED; }; MesosSchedulerDriver* driver = reinterpret_cast<MesosSchedulerDriver*> (state.driver); return driver->sendFrameworkMessage(executorid_pb, slaveid_pb, data); }
SchedulerDriverStatus scheduler_sendFrameworkMessage( SchedulerDriverPtr driver, ProtobufObj* executorId, ProtobufObj* slaveId, const char* data) { TRACE("scheduler_sendFrameworkMessage()\n"); assert(driver != NULL); MesosSchedulerDriver* mdriver = reinterpret_cast<MesosSchedulerDriver*>(driver); ExecutorID executor; if (!utils::deserialize<ExecutorID>(executor, executorId)) { return DRIVER_ABORTED; } SlaveID slave; if (!utils::deserialize<SlaveID>(slave, slaveId)) { return DRIVER_ABORTED; } return mdriver->sendFrameworkMessage(executor, slave, data); }