zmqSapply: zmqSapply

Description Usage Arguments

View source: R/helper.R

Description

A high level function to parallely execute jobs on multiple machines

Usage

1
2
3
4
5
6
7
  zmqSapply(path, X, FUN, argv.template = list(),
    init_fun = function() { }, init_argv = list(),
    num_worker = parallel::detectCores(),
    shared_secret = "default", title = "No Title",
    redis.host = "localhost", redis.port = 6379,
    redis.timeout = 2147483647L, redis.db.index = 1L,
    redis.flush = TRUE)

Arguments

path

character, indicate the ip and port of the server

X

a list of varying arguments. X is similar to the argument X of function sapply.

FUN

a function executed on workers. FUN is similar to the argument FUN of function sapply. This argument is also passed to gen_job_set as arugment argv.enumerate.

argv.template

see gen_job_set

init_fun

a function which is executed once after the worker is registered.

num_worker

a integer to decide how many workers will be spawn on server. Note that you may dynamically link and unlink workers to zmqJobQueue.

shared_secret

A tested feature to do a simple authorization between server and worker.

title

A title of this series of jobs. Displayed in the monitor.

redis.host,

redis.port, redis.timeout. The parameter of the backend redis server. See init_server and redisConnect.

redis.db.index

The index used for this series of jobs.

redis.flush

Whether to flush the content of redis server. See init_server


wush978/RzmqJobQueue documentation built on May 4, 2019, 12:02 p.m.