Description Usage Arguments Value Examples
View source: R/presto_utilities.R
Launches an EMR Presto instanct (5 x m4.4xlarge). Synchronous and can take a while!
1 2 3 4 5 6 7 8 9 10 | emr_presto_launch_instance(
cluster_name = "R Cluster",
instance_type = "c5.4xlarge",
instance_count = 4,
query_max_memory = "150GB",
query_max_memory_per_node = "64GB",
max_connections = 100,
verbose = F,
request_as_spot_instance = F
)
|
cluster_name |
Cluster name defaults to R Cluster |
instance_type |
Type defaults to c5.4xlarge |
instance_count |
Number of slaves defaults to 4 |
query_max_memory |
Max memory (default '150GB') |
query_max_memory_per_node |
Max memory per node (default 64GB) |
max_connections |
Max connections (default 100) |
verbose |
Continuously logs the cluster status while starting it |
request_as_spot_instance |
Tries to reserve as spot instance |
the cluster_id
1 2 3 4 5 6 | cluster_id <- emr_presto_launch_instance("Test Cluster", instance_type = "c5.4xlarge", instance_count = 4)
instance_dns <- emr_presto_get_instance_dns_name(cluster_id)
con <- emr_presto_get_db_connection(instance_dns)
res <- dbSendQuery(con, 'SELECT 1')
all_rows <- dbFetch(res, -1)
emr_presto_stop_instance(cluster_id)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.