-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemr.tf
More file actions
54 lines (48 loc) · 1.41 KB
/
Copy pathemr.tf
File metadata and controls
54 lines (48 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
resource "aws_emr_cluster" "elastic_emr" {
name = var.emr_cluster_name
release_label = "emr-6.9.0"
applications = ["Spark", "Hadoop"]
ec2_attributes {
key_name = "my-keypair"
instance_profile = aws_iam_instance_profile.emr_profile.arn
subnet_id = aws_subnet.default.id
emr_managed_master_security_group = aws_security_group.emr_master.id
emr_managed_slave_security_group = aws_security_group.emr_slaves.id
}
master_instance_group {
instance_type = var.emr_instance_type
instance_count = 1
market = "ON_DEMAND"
}
core_instance_group {
instance_type = var.emr_instance_type
instance_count = var.num_core_instances
market = "SPOT"
bid_price = var.spot_bid_price
}
task_instance_group {
instance_type = var.emr_instance_type
instance_count = var.num_task_instances
market = "SPOT"
bid_price = var.spot_bid_price
}
configurations_json = <<EOF
[
{
"Classification": "spark",
"Properties": {
"maximizeResourceAllocation": "true"
}
},
{
"Classification": "spark-defaults",
"Properties": {
"spark.serializer": "org.apache.spark.serializer.KryoSerializer",
"spark.sql.shuffle.partitions": "500",
"spark.streaming.kafka.maxRatePerPartition": "20000"
}
}
]
EOF
log_uri = "s3://my-emr-logs/"
}