View source: R/starburst-map.R
| starburst_cluster | R Documentation |
Creates a cluster object for managing AWS workers (EC2 by default, or Fargate) using the staRburst Future backend.
starburst_cluster(
workers = 10,
cpu = 4,
memory = "8GB",
region = NULL,
timeout = 3600,
launch_type = "EC2",
instance_type = "c7g.xlarge",
use_spot = TRUE
)
workers |
Number of parallel workers |
cpu |
CPU units per worker |
memory |
Memory per worker |
region |
AWS region |
timeout |
Maximum runtime in seconds |
launch_type |
Compute backend: "EC2" (default) or "FARGATE" |
instance_type |
EC2 instance type when |
use_spot |
Use EC2 Spot instances for cost savings (default: TRUE) |
A starburst_cluster object
if (starburst_is_configured()) {
cluster <- starburst_cluster(workers = 20)
results <- cluster$map(data, function(x) x * 2)
# Fargate backend instead of the EC2 default
fg <- starburst_cluster(workers = 20, launch_type = "FARGATE")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.