Interface WorkerConfiguration
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
WorkerConfiguration.Jsii$Proxy
@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)",
date="2026-08-19T15:41:43.468Z")
@Stability(Experimental)
public interface WorkerConfiguration
extends software.amazon.jsii.JsiiSerializable
(experimental) The worker configuration for a Spark job.
The worker type and the number of workers are set together: providing this configuration requires both values, so a Spark job can never be given one without the other.
Example:
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.iam.*;
Stack stack;
IRole role;
Code script;
PySparkEtlJob.Builder.create(stack, "PySparkETLJob")
.jobName("PySparkETLJobCustomName")
.description("This is a description")
.role(role)
.script(script)
.glueVersion(GlueVersion.V5_1)
.continuousLogging(ContinuousLoggingProps.builder().enabled(false).build())
.workerConfiguration(WorkerConfiguration.builder()
.workerType(WorkerType.G_2X)
.numberOfWorkers(2)
.build())
.maxConcurrentRuns(100)
.timeout(Duration.hours(2))
.connections(List.of(Connection.fromConnectionName(stack, "Connection", "connectionName")))
.securityConfiguration(SecurityConfiguration.fromSecurityConfigurationName(stack, "SecurityConfig", "securityConfigName"))
.tags(Map.of(
"FirstTagName", "FirstTagValue",
"SecondTagName", "SecondTagValue",
"XTagName", "XTagValue"))
.maxRetries(2)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forWorkerConfigurationstatic final classAn implementation forWorkerConfiguration -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkerConfiguration.Builderbuilder()(experimental) The number of workers of the givenworkerTypethat are allocated when a job runs.(experimental) The type of predefined worker that is allocated when a job runs.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getNumberOfWorkers
(experimental) The number of workers of the givenworkerTypethat are allocated when a job runs. -
getWorkerType
(experimental) The type of predefined worker that is allocated when a job runs.Enum options: Standard, G_1X, G_2X, G_025X, G_4X, G_8X, Z_2X
-
builder
- Returns:
- a
WorkerConfiguration.BuilderofWorkerConfiguration
-