ReleaseLabel Class
The Amazon EMR release version to use for the job run.
Can be extended to include new EMR releases
For example, new ReleaseLabel('emr-x.xx.x-latest');
Example
ts
new tasks.EmrContainersStartJobRun(this, 'EMR Containers Start Job Run', {
virtualCluster: tasks.VirtualClusterInput.fromVirtualClusterId('de92jdei2910fwedz'),
releaseLabel: tasks.ReleaseLabel.EMR_6_2_0,
jobName: 'EMR-Containers-Job',
jobDriver: {
sparkSubmitJobDriver: {
entryPoint: sfn.TaskInput.fromText('local:///usr/lib/spark/examples/src/main/python/pi.py'),
},
},
applicationConfig: [{
classification: tasks.Classification.SPARK_DEFAULTS,
properties: {
'spark.executor.instances': '1',
'spark.executor.memory': '512M',
},
}],
});
python
tasks.EmrContainersStartJobRun(self, "EMR Containers Start Job Run",
virtual_cluster=tasks.VirtualClusterInput.from_virtual_cluster_id("de92jdei2910fwedz"),
release_label=tasks.ReleaseLabel.EMR_6_2_0,
job_name="EMR-Containers-Job",
job_driver=tasks.JobDriver(
spark_submit_job_driver=tasks.SparkSubmitJobDriver(
entry_point=sfn.TaskInput.from_text("local:///usr/lib/spark/examples/src/main/python/pi.py")
)
),
application_config=[tasks.ApplicationConfiguration(
classification=tasks.Classification.SPARK_DEFAULTS,
properties={
"spark.executor.instances": "1",
"spark.executor.memory": "512M"
}
)]
)
java
EmrContainersStartJobRun.Builder.create(this, "EMR Containers Start Job Run")
.virtualCluster(VirtualClusterInput.fromVirtualClusterId("de92jdei2910fwedz"))
.releaseLabel(ReleaseLabel.EMR_6_2_0)
.jobName("EMR-Containers-Job")
.jobDriver(JobDriver.builder()
.sparkSubmitJobDriver(SparkSubmitJobDriver.builder()
.entryPoint(TaskInput.fromText("local:///usr/lib/spark/examples/src/main/python/pi.py"))
.build())
.build())
.applicationConfig(List.of(ApplicationConfiguration.builder()
.classification(Classification.SPARK_DEFAULTS)
.properties(Map.of(
"spark.executor.instances", "1",
"spark.executor.memory", "512M"))
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
new EmrContainersStartJobRun(this, "EMR Containers Start Job Run", new EmrContainersStartJobRunProps {
VirtualCluster = VirtualClusterInput.FromVirtualClusterId("de92jdei2910fwedz"),
ReleaseLabel = ReleaseLabel.EMR_6_2_0,
JobName = "EMR-Containers-Job",
JobDriver = new JobDriver {
SparkSubmitJobDriver = new SparkSubmitJobDriver {
EntryPoint = TaskInput.FromText("local:///usr/lib/spark/examples/src/main/python/pi.py")
}
},
ApplicationConfig = new [] { new ApplicationConfiguration {
Classification = Classification.SPARK_DEFAULTS,
Properties = new Dictionary<string, string> {
{ "spark.executor.instances", "1" },
{ "spark.executor.memory", "512M" }
}
} }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
tasks.NewEmrContainersStartJobRun(this, jsii.String("EMR Containers Start Job Run"), &EmrContainersStartJobRunProps{
VirtualCluster: tasks.VirtualClusterInput_FromVirtualClusterId(jsii.String("de92jdei2910fwedz")),
ReleaseLabel: tasks.ReleaseLabel_EMR_6_2_0(),
JobName: jsii.String("EMR-Containers-Job"),
JobDriver: &JobDriver{
SparkSubmitJobDriver: &SparkSubmitJobDriver{
EntryPoint: sfn.TaskInput_FromText(jsii.String("local:///usr/lib/spark/examples/src/main/python/pi.py")),
},
},
ApplicationConfig: []ApplicationConfiguration{
&ApplicationConfiguration{
Classification: tasks.Classification_SPARK_DEFAULTS(),
Properties: map[string]*string{
"spark.executor.instances": jsii.String("1"),
"spark.executor.memory": jsii.String("512M"),
},
},
},
})
Initializer
ts
new ReleaseLabel(label: string)
python
ReleaseLabel(label: str)
java
new ReleaseLabel(String label)
csharp
new ReleaseLabel(string label)
go
NewReleaseLabel(Label *string)
Properties
EMR_5_32_0ReleaseLabelemr_5_32_0ReleaseLabelEMR_5_32_0ReleaseLabelEMR_5_32_0ReleaseLabelEMR_5_32_0ReleaseLabelstatic#EMR Release version 5.32.0.
EMR_5_33_0ReleaseLabelemr_5_33_0ReleaseLabelEMR_5_33_0ReleaseLabelEMR_5_33_0ReleaseLabelEMR_5_33_0ReleaseLabelstatic#EMR Release version 5.33.0.
EMR_6_2_0ReleaseLabelemr_6_2_0ReleaseLabelEMR_6_2_0ReleaseLabelEMR_6_2_0ReleaseLabelEMR_6_2_0ReleaseLabelstatic#EMR Release version 6.2.0.
EMR_6_3_0ReleaseLabelemr_6_3_0ReleaseLabelEMR_6_3_0ReleaseLabelEMR_6_3_0ReleaseLabelEMR_6_3_0ReleaseLabelstatic#EMR Release version 6.3.0.
A literal string that contains the release-version ex.
'emr-x.x.x-latest'