crew_class_launcher_cluster {crew.cluster}R Documentation

[Maturing] Abstract cluster launcher class

Description

R6 class to help develop specific cluster launcher plugins.

Details

See crew_launcher_cluster().

Attribution

The template files at https://github.com/mschubert/clustermq/tree/master/inst informed the development of the crew launcher plugins in crew.cluster, and we would like to thank Michael Schubert for developing clustermq and releasing it under the permissive Apache License 2.0. See the NOTICE and README.md files in the crew.cluster source code for additional attribution.

Super class

crew::crew_class_launcher -> crew_class_launcher_cluster

Active bindings

verbose

See crew_launcher_cluster().

command_submit

See crew_launcher_cluster().

command_terminate

See crew_launcher_cluster().

script_directory

See crew_launcher_cluster().

script_lines

See crew_launcher_cluster().

prefix

Character of length 1, randomly generated sub-string in job names.

Methods

Public methods

Inherited methods

Method new()

Abstract launcher constructor.

Usage
crew_class_launcher_cluster$new(
  name = NULL,
  seconds_interval = NULL,
  seconds_timeout = NULL,
  seconds_launch = NULL,
  seconds_idle = NULL,
  seconds_wall = NULL,
  tasks_max = NULL,
  tasks_timers = NULL,
  reset_globals = NULL,
  reset_packages = NULL,
  reset_options = NULL,
  garbage_collection = NULL,
  launch_max = NULL,
  tls = NULL,
  verbose = NULL,
  command_submit = NULL,
  command_terminate = NULL,
  script_directory = NULL,
  script_lines = NULL
)
Arguments
name

See crew_launcher_cluster().

seconds_interval

See crew_launcher_cluster().

seconds_timeout

See crew_launcher_cluster().

seconds_launch

See crew_launcher_cluster().

seconds_idle

See crew_launcher_cluster().

seconds_wall

See crew_launcher_cluster().

tasks_max

See crew_launcher_cluster().

tasks_timers

See crew_launcher_cluster().

reset_globals

See crew_launcher_cluster().

reset_packages

See crew_launcher_cluster().

reset_options

See crew_launcher_cluster().

garbage_collection

See crew_launcher_cluster().

launch_max

See crew_launcher_cluster().

tls

See crew_launcher_cluster().

verbose

See crew_launcher_cluster().

command_submit

See crew_launcher_cluster().

command_terminate

See crew_launcher_cluster().

script_directory

See crew_launcher_cluster().

script_lines

See crew_launcher_cluster().

Returns

An abstract launcher object.


Method validate()

Validate the launcher.

Usage
crew_class_launcher_cluster$validate()
Returns

NULL (invisibly). Throws an error if a field is invalid.


Method launch_worker()

Launch a local process worker which will dial into a socket.

Usage
crew_class_launcher_cluster$launch_worker(
  call,
  name,
  launcher,
  worker,
  instance
)
Arguments
call

Character of length 1, a namespaced call to crew::crew_worker() which will run in the worker and accept tasks.

name

Character of length 1, an informative worker name.

launcher

Character of length 1, name of the launcher.

worker

Positive integer of length 1, index of the worker. This worker index remains the same even when the current instance of the worker exits and a new instance launches. It is always between 1 and the maximum number of concurrent workers.

instance

Character of length 1 to uniquely identify the current instance of the worker.

Details

The call argument is R code that will run to initiate the worker.

Returns

A handle object to allow the termination of the worker later on.


Method terminate_worker()

Terminate a local process worker.

Usage
crew_class_launcher_cluster$terminate_worker(handle)
Arguments
handle

A process handle object previously returned by launch_worker().

Returns

NULL (invisibly).

See Also

Other cluster: crew_class_monitor_cluster, crew_launcher_cluster(), crew_monitor_cluster()


[Package crew.cluster version 0.3.2 Index]