Skip to content

Commit f6a2631

Browse files
author
awstools
committed
feat(client-emr-serverless): This release adds support for job concurrency and queuing configuration at Application level.
1 parent 70db983 commit f6a2631

File tree

7 files changed

+149
-5
lines changed

7 files changed

+149
-5
lines changed

clients/client-emr-serverless/src/commands/CreateApplicationCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
134134
* studioEnabled: true || false,
135135
* livyEndpointEnabled: true || false,
136136
* },
137+
* schedulerConfiguration: { // SchedulerConfiguration
138+
* queueTimeoutMinutes: Number("int"),
139+
* maxConcurrentRuns: Number("int"),
140+
* },
137141
* };
138142
* const command = new CreateApplicationCommand(input);
139143
* const response = await client.send(command);

clients/client-emr-serverless/src/commands/GetApplicationCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ export interface GetApplicationCommandOutput extends GetApplicationResponse, __M
147147
* // studioEnabled: true || false,
148148
* // livyEndpointEnabled: true || false,
149149
* // },
150+
* // schedulerConfiguration: { // SchedulerConfiguration
151+
* // queueTimeoutMinutes: Number("int"),
152+
* // maxConcurrentRuns: Number("int"),
153+
* // },
150154
* // },
151155
* // };
152156
*

clients/client-emr-serverless/src/commands/GetJobRunCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ export interface GetJobRunCommandOutput extends GetJobRunResponse, __MetadataBea
143143
* // attempt: Number("int"),
144144
* // attemptCreatedAt: new Date("TIMESTAMP"),
145145
* // attemptUpdatedAt: new Date("TIMESTAMP"),
146+
* // startedAt: new Date("TIMESTAMP"),
147+
* // endedAt: new Date("TIMESTAMP"),
148+
* // queuedDurationMilliseconds: Number("long"),
146149
* // },
147150
* // };
148151
*

clients/client-emr-serverless/src/commands/UpdateApplicationCommand.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ export interface UpdateApplicationCommandOutput extends UpdateApplicationRespons
132132
* remoteWriteUrl: "STRING_VALUE",
133133
* },
134134
* },
135+
* schedulerConfiguration: { // SchedulerConfiguration
136+
* queueTimeoutMinutes: Number("int"),
137+
* maxConcurrentRuns: Number("int"),
138+
* },
135139
* };
136140
* const command = new UpdateApplicationCommand(input);
137141
* const response = await client.send(command);
@@ -238,6 +242,10 @@ export interface UpdateApplicationCommandOutput extends UpdateApplicationRespons
238242
* // studioEnabled: true || false,
239243
* // livyEndpointEnabled: true || false,
240244
* // },
245+
* // schedulerConfiguration: { // SchedulerConfiguration
246+
* // queueTimeoutMinutes: Number("int"),
247+
* // maxConcurrentRuns: Number("int"),
248+
* // },
241249
* // },
242250
* // };
243251
*

clients/client-emr-serverless/src/models/models_0.ts

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ export interface InteractiveConfiguration {
139139
}
140140

141141
/**
142-
* <p>The maximum allowed cumulative resources for an application. No new resources will be
143-
* created once the limit is hit.</p>
142+
* <p>The maximum allowed cumulative resources for an application. No new resources will be created once the limit is hit.</p>
144143
* @public
145144
*/
146145
export interface MaximumAllowedResources {
@@ -320,6 +319,24 @@ export interface NetworkConfiguration {
320319
securityGroupIds?: string[];
321320
}
322321

322+
/**
323+
* <p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>
324+
* @public
325+
*/
326+
export interface SchedulerConfiguration {
327+
/**
328+
* <p>The maximum duration in minutes for the job in QUEUED state. If scheduler configuration is enabled on your application, the default value is 360 minutes (6 hours). The valid range is from 15 to 720.</p>
329+
* @public
330+
*/
331+
queueTimeoutMinutes?: number;
332+
333+
/**
334+
* <p>The maximum concurrent job runs on this application. If scheduler configuration is enabled on your application, the default value is 15. The valid range is 1 to 1000.</p>
335+
* @public
336+
*/
337+
maxConcurrentRuns?: number;
338+
}
339+
323340
/**
324341
* @public
325342
* @enum
@@ -930,6 +947,7 @@ export const JobRunState = {
930947
CANCELLING: "CANCELLING",
931948
FAILED: "FAILED",
932949
PENDING: "PENDING",
950+
QUEUED: "QUEUED",
933951
RUNNING: "RUNNING",
934952
SCHEDULED: "SCHEDULED",
935953
SUBMITTED: "SUBMITTED",
@@ -1540,6 +1558,12 @@ export interface Application {
15401558
* @public
15411559
*/
15421560
interactiveConfiguration?: InteractiveConfiguration;
1561+
1562+
/**
1563+
* <p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>
1564+
* @public
1565+
*/
1566+
schedulerConfiguration?: SchedulerConfiguration;
15431567
}
15441568

15451569
/**
@@ -1674,6 +1698,12 @@ export interface CreateApplicationRequest {
16741698
* @public
16751699
*/
16761700
interactiveConfiguration?: InteractiveConfiguration;
1701+
1702+
/**
1703+
* <p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>
1704+
* @public
1705+
*/
1706+
schedulerConfiguration?: SchedulerConfiguration;
16771707
}
16781708

16791709
/**
@@ -1779,6 +1809,12 @@ export interface UpdateApplicationRequest {
17791809
* @public
17801810
*/
17811811
monitoringConfiguration?: MonitoringConfiguration;
1812+
1813+
/**
1814+
* <p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>
1815+
* @public
1816+
*/
1817+
schedulerConfiguration?: SchedulerConfiguration;
17821818
}
17831819

17841820
/**
@@ -1950,6 +1986,24 @@ export interface JobRun {
19501986
* @public
19511987
*/
19521988
attemptUpdatedAt?: Date;
1989+
1990+
/**
1991+
* <p>The date and time when the job moved to the RUNNING state.</p>
1992+
* @public
1993+
*/
1994+
startedAt?: Date;
1995+
1996+
/**
1997+
* <p>The date and time when the job was terminated.</p>
1998+
* @public
1999+
*/
2000+
endedAt?: Date;
2001+
2002+
/**
2003+
* <p>The total time for a job in the QUEUED state in milliseconds.</p>
2004+
* @public
2005+
*/
2006+
queuedDurationMilliseconds?: number;
19532007
}
19542008

19552009
/**

clients/client-emr-serverless/src/protocols/Aws_restJson1.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ import {
8383
ResourceUtilization,
8484
RetryPolicy,
8585
S3MonitoringConfiguration,
86+
SchedulerConfiguration,
8687
ServiceQuotaExceededException,
8788
SparkSubmit,
8889
TotalResourceUtilization,
@@ -136,6 +137,7 @@ export const se_CreateApplicationCommand = async (
136137
networkConfiguration: (_) => _json(_),
137138
releaseLabel: [],
138139
runtimeConfiguration: (_) => se_ConfigurationList(_, context),
140+
schedulerConfiguration: (_) => _json(_),
139141
tags: (_) => _json(_),
140142
type: [],
141143
workerTypeSpecifications: (_) => _json(_),
@@ -434,6 +436,7 @@ export const se_UpdateApplicationCommand = async (
434436
networkConfiguration: (_) => _json(_),
435437
releaseLabel: [],
436438
runtimeConfiguration: (_) => se_ConfigurationList(_, context),
439+
schedulerConfiguration: (_) => _json(_),
437440
workerTypeSpecifications: (_) => _json(_),
438441
})
439442
);
@@ -965,6 +968,8 @@ const se_ConfigurationOverrides = (input: ConfigurationOverrides, context: __Ser
965968

966969
// se_S3MonitoringConfiguration omitted.
967970

971+
// se_SchedulerConfiguration omitted.
972+
968973
// se_SecurityGroupIds omitted.
969974

970975
// se_SensitivePropertiesMap omitted.
@@ -1001,6 +1006,7 @@ const de_Application = (output: any, context: __SerdeContext): Application => {
10011006
networkConfiguration: _json,
10021007
releaseLabel: __expectString,
10031008
runtimeConfiguration: (_: any) => de_ConfigurationList(_, context),
1009+
schedulerConfiguration: _json,
10041010
state: __expectString,
10051011
stateDetails: __expectString,
10061012
tags: _json,
@@ -1107,15 +1113,18 @@ const de_JobRun = (output: any, context: __SerdeContext): JobRun => {
11071113
configurationOverrides: (_: any) => de_ConfigurationOverrides(_, context),
11081114
createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
11091115
createdBy: __expectString,
1116+
endedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
11101117
executionRole: __expectString,
11111118
executionTimeoutMinutes: __expectLong,
11121119
jobDriver: (_: any) => _json(__expectUnion(_)),
11131120
jobRunId: __expectString,
11141121
mode: __expectString,
11151122
name: __expectString,
11161123
networkConfiguration: _json,
1124+
queuedDurationMilliseconds: __expectLong,
11171125
releaseLabel: __expectString,
11181126
retryPolicy: _json,
1127+
startedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
11191128
state: __expectString,
11201129
stateDetails: __expectString,
11211130
tags: _json,
@@ -1225,6 +1234,8 @@ const de_ResourceUtilization = (output: any, context: __SerdeContext): ResourceU
12251234

12261235
// de_S3MonitoringConfiguration omitted.
12271236

1237+
// de_SchedulerConfiguration omitted.
1238+
12281239
// de_SecurityGroupIds omitted.
12291240

12301241
// de_SensitivePropertiesMap omitted.

codegen/sdk-codegen/aws-models/emr-serverless.json

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@
134134
"traits": {
135135
"smithy.api#documentation": "<p>The interactive configuration object that enables the interactive use cases for an application.</p>"
136136
}
137+
},
138+
"schedulerConfiguration": {
139+
"target": "com.amazonaws.emrserverless#SchedulerConfiguration",
140+
"traits": {
141+
"smithy.api#documentation": "<p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>"
142+
}
137143
}
138144
},
139145
"traits": {
@@ -1489,6 +1495,12 @@
14891495
"traits": {
14901496
"smithy.api#documentation": "<p>The interactive configuration object that enables the interactive use cases \n to use when running an application.</p>"
14911497
}
1498+
},
1499+
"schedulerConfiguration": {
1500+
"target": "com.amazonaws.emrserverless#SchedulerConfiguration",
1501+
"traits": {
1502+
"smithy.api#documentation": "<p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>"
1503+
}
14921504
}
14931505
}
14941506
},
@@ -1600,7 +1612,7 @@
16001612
"min": 20,
16011613
"max": 2048
16021614
},
1603-
"smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):kms:[a-zA-Z0-9\\-]*:(\\d{12})?:key\\/[a-zA-Z0-9-]+$"
1615+
"smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):kms:[a-zA-Z0-9\\-]*:([0-9]{12}):key\\/[a-zA-Z0-9-]+$"
16041616
}
16051617
},
16061618
"com.amazonaws.emrserverless#EngineType": {
@@ -1881,7 +1893,7 @@
18811893
"min": 20,
18821894
"max": 2048
18831895
},
1884-
"smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):iam::(\\d{12})?:(role((\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F))[\\w+=,.@-]+)$"
1896+
"smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):iam::([0-9]{12}):(role((\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F))[\\w+=,.@-]+)$"
18851897
}
18861898
},
18871899
"com.amazonaws.emrserverless#ImageConfiguration": {
@@ -2207,6 +2219,24 @@
22072219
"traits": {
22082220
"smithy.api#documentation": "<p>The date and time of when the job run attempt was last updated.</p>"
22092221
}
2222+
},
2223+
"startedAt": {
2224+
"target": "com.amazonaws.emrserverless#Date",
2225+
"traits": {
2226+
"smithy.api#documentation": "<p>The date and time when the job moved to the RUNNING state.</p>"
2227+
}
2228+
},
2229+
"endedAt": {
2230+
"target": "com.amazonaws.emrserverless#Date",
2231+
"traits": {
2232+
"smithy.api#documentation": "<p>The date and time when the job was terminated.</p>"
2233+
}
2234+
},
2235+
"queuedDurationMilliseconds": {
2236+
"target": "smithy.api#Long",
2237+
"traits": {
2238+
"smithy.api#documentation": "<p>The total time for a job in the QUEUED state in milliseconds.</p>"
2239+
}
22102240
}
22112241
},
22122242
"traits": {
@@ -2421,6 +2451,10 @@
24212451
{
24222452
"value": "CANCELLED",
24232453
"name": "CANCELLED"
2454+
},
2455+
{
2456+
"value": "QUEUED",
2457+
"name": "QUEUED"
24242458
}
24252459
]
24262460
}
@@ -3008,7 +3042,7 @@
30083042
}
30093043
},
30103044
"traits": {
3011-
"smithy.api#documentation": "<p>The maximum allowed cumulative resources for an application. No new resources will be\n created once the limit is hit.</p>"
3045+
"smithy.api#documentation": "<p>The maximum allowed cumulative resources for an application. No new resources will be created once the limit is hit.</p>"
30123046
}
30133047
},
30143048
"com.amazonaws.emrserverless#MemorySize": {
@@ -3234,6 +3268,26 @@
32343268
"smithy.api#documentation": "<p>The Amazon S3 configuration for monitoring log publishing. You can configure your jobs\n to send log information to Amazon S3.</p>"
32353269
}
32363270
},
3271+
"com.amazonaws.emrserverless#SchedulerConfiguration": {
3272+
"type": "structure",
3273+
"members": {
3274+
"queueTimeoutMinutes": {
3275+
"target": "smithy.api#Integer",
3276+
"traits": {
3277+
"smithy.api#documentation": "<p>The maximum duration in minutes for the job in QUEUED state. If scheduler configuration is enabled on your application, the default value is 360 minutes (6 hours). The valid range is from 15 to 720.</p>"
3278+
}
3279+
},
3280+
"maxConcurrentRuns": {
3281+
"target": "smithy.api#Integer",
3282+
"traits": {
3283+
"smithy.api#documentation": "<p>The maximum concurrent job runs on this application. If scheduler configuration is enabled on your application, the default value is 15. The valid range is 1 to 1000.</p>"
3284+
}
3285+
}
3286+
},
3287+
"traits": {
3288+
"smithy.api#documentation": "<p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>"
3289+
}
3290+
},
32373291
"com.amazonaws.emrserverless#SecurityGroupIds": {
32383292
"type": "list",
32393293
"member": {
@@ -3886,6 +3940,12 @@
38863940
"traits": {
38873941
"smithy.api#documentation": "<p>The configuration setting for monitoring.</p>"
38883942
}
3943+
},
3944+
"schedulerConfiguration": {
3945+
"target": "com.amazonaws.emrserverless#SchedulerConfiguration",
3946+
"traits": {
3947+
"smithy.api#documentation": "<p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>"
3948+
}
38893949
}
38903950
}
38913951
},

0 commit comments

Comments
 (0)