Class JobEnvironment.Builder
- java.lang.Object
-
- com.netflix.genie.common.internal.dtos.JobEnvironment.Builder
-
- Enclosing class:
- JobEnvironment
public static class JobEnvironment.Builder extends java.lang.Object
Builder to create an immutableJobEnvironment
instance.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description Builder()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JobEnvironment
build()
Build a new immutable instance of anJobEnvironment
.JobEnvironment.Builder
withComputeResources(ComputeResources computeResources)
Set the computation resources for the job.JobEnvironment.Builder
withEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environmentVariables)
Set any environment variables that the agent should add to the job runtime.JobEnvironment.Builder
withExt(com.fasterxml.jackson.databind.JsonNode ext)
Set the extension configuration for the agent.JobEnvironment.Builder
withImages(java.util.Map<java.lang.String,Image> images)
Set the images the job should use.
-
-
-
Method Detail
-
withEnvironmentVariables
public JobEnvironment.Builder withEnvironmentVariables(@Nullable java.util.Map<java.lang.String,java.lang.String> environmentVariables)
Set any environment variables that the agent should add to the job runtime.- Parameters:
environmentVariables
- Additional environment variables- Returns:
- The builder
-
withExt
public JobEnvironment.Builder withExt(@Nullable com.fasterxml.jackson.databind.JsonNode ext)
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
public JobEnvironment.Builder withComputeResources(ComputeResources computeResources)
Set the computation resources for the job.- Parameters:
computeResources
- TheComputeResources
- Returns:
- This
JobEnvironment.Builder
instance
-
withImages
public JobEnvironment.Builder withImages(java.util.Map<java.lang.String,Image> images)
Set the images the job should use.- Parameters:
images
- TheImage
set to use- Returns:
- This
JobEnvironment.Builder
instance
-
build
public JobEnvironment build()
Build a new immutable instance of anJobEnvironment
.- Returns:
- An instance containing the fields set in this builder
-
-