Class JobEnvironment.Builder
java.lang.Object
com.netflix.genie.common.internal.dtos.JobEnvironment.Builder
- Enclosing class:
- JobEnvironment
Builder to create an immutable
JobEnvironment instance.- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a new immutable instance of anJobEnvironment.withComputeResources(ComputeResources computeResources) Set the computation resources for the job.withEnvironmentVariables(Map<String, String> environmentVariables) Set any environment variables that the agent should add to the job runtime.withExt(com.fasterxml.jackson.databind.JsonNode ext) Set the extension configuration for the agent.withImages(Map<String, Image> images) Set the images the job should use.
-
Constructor Details
-
Builder
public Builder()Constructor.
-
-
Method Details
-
withEnvironmentVariables
public JobEnvironment.Builder withEnvironmentVariables(@Nullable Map<String, String> environmentVariables) Set any environment variables that the agent should add to the job runtime.- Parameters:
environmentVariables- Additional environment variables- Returns:
- The builder
-
withExt
Set the extension configuration for the agent. This is generally used for specific implementations of the job launcher e.g. on Titus or local docker etc.- Parameters:
ext- The extension configuration which is effectively a DSL per job launch implementation- Returns:
- The builder
-
withComputeResources
Set the computation resources for the job.- Parameters:
computeResources- TheComputeResources- Returns:
- This
JobEnvironment.Builderinstance
-
withImages
Set the images the job should use.- Parameters:
images- TheImageset to use- Returns:
- This
JobEnvironment.Builderinstance
-
build
Build a new immutable instance of anJobEnvironment.- Returns:
- An instance containing the fields set in this builder
-