WorkerConfiguration
- class aws_cdk.aws_glue.WorkerConfiguration(*, number_of_workers, worker_type)
Bases:
objectThe 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.
- Parameters:
number_of_workers (
Union[int,float]) – The number of workers of the givenworkerTypethat are allocated when a job runs.worker_type (
WorkerType) – The type of predefined worker that is allocated when a job runs. See theWorkerTypeenum for the full set of supported values.
- ExampleMetadata:
infused
Example:
import aws_cdk as cdk import aws_cdk.aws_iam as iam # stack: cdk.Stack # role: iam.IRole # script: glue.Code glue.PySparkEtlJob(stack, "PySparkETLJob", job_name="PySparkETLJobCustomName", description="This is a description", role=role, script=script, glue_version=glue.GlueVersion.V5_1, continuous_logging=glue.ContinuousLoggingProps(enabled=False), worker_configuration=glue.WorkerConfiguration( worker_type=glue.WorkerType.G_2X, number_of_workers=2 ), max_concurrent_runs=100, timeout=cdk.Duration.hours(2), connections=[glue.Connection.from_connection_name(stack, "Connection", "connectionName")], security_configuration=glue.SecurityConfiguration.from_security_configuration_name(stack, "SecurityConfig", "securityConfigName"), tags={ "FirstTagName": "FirstTagValue", "SecondTagName": "SecondTagValue", "XTagName": "XTagValue" }, max_retries=2 )
Attributes
- number_of_workers
The number of workers of the given
workerTypethat are allocated when a job runs.
- worker_type
The type of predefined worker that is allocated when a job runs.
See the
WorkerTypeenum for the full set of supported values.