예제 #1
0
/** Function to communicate foreach status to worker
 * @param complete information whether the foreach was successful or not
 * @return NULL
 */
void WorkerInfo::MetadataUpdate(
    const MetadataUpdateRequest& metadataupdate) {
  WorkerRequest req;
  req.set_type(WorkerRequest::METADATAUPDATE);
  req.mutable_metadataupdate()->CopyFrom(metadataupdate);
  SendZMQMessagePush(req);
}
예제 #2
0
/** This function lets a worker to persist a split for one of its executor
 * @param persist Contains information about the object to be persisted and source executor
 * @return NULL
 */
void WorkerInfo::Persist(const PersistRequest& persist) {
  WorkerRequest req;  // Create a request to worker
  req.set_type(WorkerRequest::PERSIST);
  req.mutable_fetch()->CopyFrom(persist);
  //  SendZMQMessage(req, res);
  SendZMQMessagePush(req);  // send message
}
예제 #3
0
/** Send a command to download (fetch) a split from a target host
 * @param fetch information about the task
 * @return NULL
 */
void WorkerInfo::Fetch(const FetchRequest& fetch) {
  WorkerRequest req;
  req.set_type(WorkerRequest::FETCH);
  req.mutable_fetch()->CopyFrom(fetch);
#ifdef PERF_TRACE
  struct blkin_trace_info info;
  master_trace->get_trace_info(&info);
  req.set_parent_span_id(info.parent_span_id);
  req.set_span_id(info.span_id);
  req.set_trace_id(info.trace_id);
#endif
  //  SendZMQMessage(req, res);
  SendZMQMessagePush(req);
}
예제 #4
0
/** This function delivers a new function initiated from R session
 * @param newexecr contains information to execute a R function (all the arguments)
 * @return NULL
 */
void WorkerInfo::NewExecuteR(const NewExecuteRRequest& newexecr) {
  WorkerRequest req;
  req.set_type(WorkerRequest::NEWEXECR);
  req.mutable_newexecr()->CopyFrom(newexecr);
  
#ifdef PERF_TRACE
  struct blkin_trace_info info;
  master_trace->get_trace_info(&info);
  req.set_parent_span_id(info.parent_span_id);
  req.set_span_id(info.span_id);
  req.set_trace_id(info.trace_id);
#endif
  SendZMQMessagePush(req);
}
예제 #5
0
/** Functio to create a composite array
 * @param createcomposite information about this composite array creation
 * @return NULL
 */
void WorkerInfo::CreateComposite(
    const CreateCompositeRequest& createcomposite) {
  WorkerRequest req;
  req.set_type(WorkerRequest::CREATECOMPOSITE);
  req.mutable_createcomposite()->CopyFrom(createcomposite);

#ifdef PERF_TRACE
  struct blkin_trace_info info;
  master_trace->get_trace_info(&info);
  req.set_parent_span_id(info.parent_span_id);
  req.set_span_id(info.span_id);
  req.set_trace_id(info.trace_id);
#endif
  SendZMQMessagePush(req);
}
예제 #6
0
/** This function lets a worker to send a split to a remote worker
 * @param fetch Contains information about the fetched object and target host
 * @return NULL
 */
void WorkerInfo::NewTransfer(const FetchRequest& fetch) {
  WorkerRequest req;  // Create a request to worker
  req.set_type(WorkerRequest::NEWTRANSFER);
  req.mutable_fetch()->CopyFrom(fetch);
#ifdef PERF_TRACE
  struct blkin_trace_info info;
  if(worker_trace.get()){
  worker_trace->get_trace_info(&info);
  }else{
      info.trace_id = 1337;
  }
  req.set_parent_span_id(info.parent_span_id);
  req.set_span_id(info.span_id);
  req.set_trace_id(info.trace_id);
#endif
  
  //  SendZMQMessage(req, res);
  SendZMQMessagePush(req);  // send message
}
예제 #7
0
/** Send a worker aborting message upon worker exiting. Upon getting this, the master shutdown the sessions by killing all other workers
 * @param workerabort worker aboring message (include the reason why it is aborting)
 * @return NULL
 */
void MasterClient::WorkerAborting(const WorkerAbortRequest& workerabort) {
  MasterRequest req;
  req.set_type(MasterRequest::WORKERABORT);
  req.mutable_workerabort()->CopyFrom(workerabort);
  SendZMQMessagePush(req);
}
예제 #8
0
/** Sending an acknowledgement to a master upon getting Hello message
 * @param helloreply HelloReply message
 * @return NULL
 */
void MasterClient::HelloReply(const HelloReplyRequest& helloreply) {
  MasterRequest req;
  req.set_type(MasterRequest::HELLOREPLY);
  req.mutable_helloreply()->CopyFrom(helloreply);
  SendZMQMessagePush(req);
}
예제 #9
0
/** This message is sent to a master when a task is done. It contains updated darray information, task result (succeed/fail), message
 * @param taskdone a message to be sent to a worker
 * @return NULL
 */
void MasterClient::TaskDone(const TaskDoneRequest& taskdone) {
  MasterRequest req;
  req.set_type(MasterRequest::TASKDONE);
  req.mutable_taskdone()->CopyFrom(taskdone);
  SendZMQMessagePush(req);
}
예제 #10
0
/** Sending NewUpdate task to the master. This function does not seem to be used. TaskDoneRequest includes update information
 * @param newupdate contains information about the new update
 * @return NULL
 */
void MasterClient::NewUpdate(const NewUpdateRequest& newupdate) {
  MasterRequest req;
  req.set_type(MasterRequest::NEWUPDATE);
  req.mutable_newupdate()->CopyFrom(newupdate);
    SendZMQMessagePush(req);
}
예제 #11
0
void WorkerInfo::VerticaLoad(const VerticaDLRequest& verticaload) {
  WorkerRequest req;
  req.set_type(WorkerRequest::VERTICALOAD);
  req.mutable_verticaload()->CopyFrom(verticaload);
  SendZMQMessagePush(req);
}
예제 #12
0
/** A function used in OOC scheduler
 * @param log information of the task
 * @return NULL
 */
void WorkerInfo::Log(const LogRequest& log) {
  WorkerRequest req;
  req.set_type(WorkerRequest::LOG);
  req.mutable_log()->CopyFrom(log);
  SendZMQMessagePush(req);
}
예제 #13
0
/** Delete a darray object from a shared memory region
 * @param clear information about a darray to be deleted
 * @return NULL
 */
void WorkerInfo::Clear(const ClearRequest& clear) {
  WorkerRequest req;
  req.set_type(WorkerRequest::CLEAR);
  req.mutable_clear()->CopyFrom(clear);
  SendZMQMessagePush(req);
}
예제 #14
0
/** This performs IO operation (LOAD/SAVE) of darrays in a shared memory region
 * @param io information about this io request
 * @return NULL
 */
void WorkerInfo::IO(const IORequest& io) {
  WorkerRequest req;
  req.set_type(WorkerRequest::IO);
  req.mutable_io()->CopyFrom(io);
  SendZMQMessagePush(req);
}
예제 #15
0
/** A function that sends a shutdown message to a worker. Upon getting this, a worker will perform clean-shutdown
 * @return NULL
 */
void WorkerInfo::Shutdown() {
  WorkerRequest req;
  req.set_type(WorkerRequest::SHUTDOWN);
  SendZMQMessagePush(req);
}
예제 #16
0
/** A method to send hello message to a target worker. This is to initiate connection from worker and master
 * @param hello contains hello request information master location and session begin time
 * @return NULL
 */
void WorkerInfo::Hello(const HelloRequest& hello) {
  WorkerRequest req;
  req.set_type(WorkerRequest::HELLO);
  req.mutable_hello()->CopyFrom(hello);
  SendZMQMessagePush(req);
}