web_client | R Documentation |
DIDE cluster web client
DIDE cluster web client
Client for the DIDE cluster web interface.
new()
Create an API client for the DIDE cluster
web_client$new( credentials = NULL, cluster_default = "fi--dideclusthn", login = FALSE, client = NULL )
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.
login()
Log in to the cluster
web_client$login(refresh = TRUE)
refresh
Logical, indicating if we should login even if it looks like we are already (useful if login has expired)
logout()
Log the client out
web_client$logout()
logged_in()
Test whether the client is logged in, returning TRUE
or FALSE
.
web_client$logged_in()
check_access()
Validate that we have access to a given cluster
web_client$check_access(cluster = NULL)
cluster
The name of the cluster to check, defaulting to the value given when creating the client.
submit()
Submit a job to the cluster
web_client$submit( path, name, template, cluster = NULL, resource_type = "Cores", resource_count = 1, depends_on = NULL )
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.
cancel()
Cancel a cluster task
web_client$cancel(dide_id, cluster = NULL)
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.
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
log()
Get log from job
web_client$log(dide_id, cluster = NULL)
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.
status_user()
Return status of all your jobs
web_client$status_user(state = "*", cluster = NULL)
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.
status_job()
Return status of a single job
web_client$status_job(dide_id, cluster = NULL)
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.
load_node()
Return an overall measure of cluster use, one entry per node within a cluster.
web_client$load_node(cluster = NULL)
cluster
The cluster to query, defaulting to the value given when creating the client.
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.
web_client$load_overall()
load_show()
web_client$load_show(cluster = NULL, nodes = TRUE)
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
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.
web_client$headnodes(forget = FALSE)
forget
Logical, indicating we should re-fetch the value from the server where we have previously fetched it.
r_versions()
Return a vector of all available R versions
web_client$r_versions()
api_client()
Returns the low-level API client for debugging
web_client$api_client()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.