-
Notifications
You must be signed in to change notification settings - Fork 16
/
sample_workflow.json.mustache
121 lines (121 loc) · 4.07 KB
/
sample_workflow.json.mustache
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{
"name": "test workflow",
"resources": [
{
"id": "1",
"name": "emr cluster",
"resourceType": "aws.resource.EmrResource",
"resourceSpec": {
"releaseLabel": "emr-6.3.0",
"applications": ["Spark"],
"serviceRole": "EMR_DefaultRole",
"resourceRole": "EMR_EC2_DefaultRole",
"instancesConfig": {
"subnetId": "{{resources.subnetId}}",
"ec2KeyName": "orchard",
"instanceGroupConfigs": [
{
"instanceRoleType": "MASTER",
"instanceCount": 1,
"instanceType": "m5.xlarge"
},
{
"instanceRoleType": "CORE",
"instanceCount": 1,
"instanceType": "m5.xlarge"
}
]
},
"sparkConfigs": [
{
"classification": "spark",
"properties": {
"maximizeResourceAllocation": "true"
}
},
{
"classification": "spark-defaults",
"properties": {
"spark.sql.defaultUrlStreamHandlerFactory.enabled": "false",
"spark.dynamicAllocation.enabled": "false"
}
},
{
"classification": "spark-env",
"configurations": [
{
"classification": "export",
"properties": {
"{{sparkConfig.env_key}}": "{{sparkConfig.env_val}}"
}
}
]
}
]
},
"maxAttempt": 3
}
],
"activities": [
{
"id": "1",
"name": "activity 1",
"activityType": "aws.activity.EmrActivity",
"activitySpec": {
"steps": [
{
"jar": "command-runner.jar",
"args": [
"spark-submit",
"s3://{{s3bucket}}/managed/health_violations.py",
"--data_source",
"s3://{{s3bucket}}/data/food_establishment_data.csv",
"--output_uri",
"s3://{{s3bucket}}/data/output"
]
}
]
},
"resourceId": "1",
"maxAttempt": 3
},
{
"id": "2",
"name": "activity 2",
"activityType": "aws.activity.EmrActivity",
"activitySpec": {
"steps": [
{
"jar": "command-runner.jar",
"args": [
"spark-submit",
"s3://{{s3bucket}}/managed/health_violations.py",
"--data_source",
"s3://{{s3bucket}}/data/food_establishment_data.csv",
"--output_uri",
"s3://{{s3bucket}}/data/output"
]
}
]
},
"resourceId": "1",
"onFailure": ["1"],
"maxAttempt": 3
}
],
"actions": [
{
"id": "1",
"name": "action 1",
"actionType": "aws.action.SnsAction",
"actionSpec": {
"topicArn": "{{snsArn}}",
"subject": "hi - subject",
"message": "hi - message"
}
}
],
"dependencies": {
"2": ["1"]
}
}