DIDE cluster web client

DIDE cluster web client

Details

Client for the DIDE cluster web interface.

Methods


Method new()

Create an API client for the DIDE cluster

Usage

web_client$new(
  credentials = NULL,
  cluster_default = "fi--dideclusthn",
  login = FALSE,
  client = NULL
)

Arguments

credentials

Either your username, or a list with at least the element username and possibly the name `password. If not given, your password will be prompted for at login.

cluster_default

The default cluster to use; this can be overridden in any command.

login

Logical, indicating if we should immediately login

client

Optional API client object - if given then we prefer this object rather than trying to create a new client with the given credentials.


Method login()

Log in to the cluster

Usage

web_client$login(refresh = TRUE)

Arguments

refresh

Logical, indicating if we should login even if it looks like we are already (useful if login has expired)


Method logout()

Log the client out

Usage

web_client$logout()


Method logged_in()

Test whether the client is logged in, returning TRUE or FALSE.

Usage

web_client$logged_in()


Method check_access()

Validate that we have access to a given cluster

Usage

web_client$check_access(cluster = NULL)

Arguments

cluster

The name of the cluster to check, defaulting to the value given when creating the client.


Method submit()

Submit a job to the cluster

Usage

web_client$submit(
  path,
  name,
  template,
  cluster = NULL,
  resource_type = "Cores",
  resource_count = 1,
  depends_on = NULL
)

Arguments

path

The path to the job to submit. This must be a windows (UNC) network path, starting with two backslashes, and must be somewhere that the cluster can see.

name

The name of the job (will be displayed in the web interface).

template

The name of the template to use.

cluster

The cluster to submit to, defaulting to the value given when creating the client.

resource_type

The type of resource to request (either Cores or Nodes)

resource_count

The number of resources to request

depends_on

Optional. A vector of dide ids that this job depends on.


Method cancel()

Cancel a cluster task

Usage

web_client$cancel(dide_id, cluster = NULL)

Arguments

dide_id

The DIDE task id for the task

cluster

The cluster that the task is running on, defaulting to the value given when creating the client.

Returns

A named character vector with a status reported by the cluster head node. Names will be the values of dide_id and values one of OK, NOT_FOUND, WRONG_USER, WRONG_STATE, ID_ERROR


Method log()

Get log from job

Usage

web_client$log(dide_id, cluster = NULL)

Arguments

dide_id

The DIDE task id for the task

cluster

The cluster that the task is running on, defaulting to the value given when creating the client.


Method status_user()

Return status of all your jobs

Usage

web_client$status_user(state = "*", cluster = NULL)

Arguments

state

The state the job is in. Can be one of Running, Finished, Queued, Failed or Cancelled. Or give * for all states (this is the default).

cluster

The cluster to query, defaulting to the value given when creating the client.


Method status_job()

Return status of a single job

Usage

web_client$status_job(dide_id, cluster = NULL)

Arguments

dide_id

The id of the job - this will be an integer

cluster

The cluster to query, defaulting to the value given when creating the client.


Method load_node()

Return an overall measure of cluster use, one entry per node within a cluster.

Usage

web_client$load_node(cluster = NULL)

Arguments

cluster

The cluster to query, defaulting to the value given when creating the client.


Method load_overall()

Return an overall measure of cluster use, one entry per cluster that you have access to. Helper function; wraps around load_overall and load_node and always shows the output.

Usage

web_client$load_overall()


Method load_show()

Usage

web_client$load_show(cluster = NULL, nodes = TRUE)

Arguments

cluster

Cluster to show; if TRUE show the entire cluster (via load_overall), if NULL defaults to the value given when the client was created.

nodes

Show the nodes when printing


Method headnodes()

Return a vector of known cluster headnodes. Typically valid_clusters() will be faster. This endpoint can be used as a relatively fast "ping" to check that you are logged in the client and server are talking properly.

Usage

web_client$headnodes(forget = FALSE)

Arguments

forget

Logical, indicating we should re-fetch the value from the server where we have previously fetched it.


Method r_versions()

Return a vector of all available R versions

Usage

web_client$r_versions()


Method api_client()

Returns the low-level API client for debugging

Usage

web_client$api_client()