Package com.netflix.genie.web.properties
Class JobResolutionProperties.Resources
- java.lang.Object
-
- com.netflix.genie.web.properties.JobResolutionProperties.Resources
-
- Enclosing class:
- JobResolutionProperties
public static class JobResolutionProperties.Resources extends java.lang.ObjectComputation resource properties.
-
-
Constructor Summary
Constructors Constructor Description Resources()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCpu()Get the default number of CPUs.org.springframework.util.unit.DataSizegetDisk()Get the amount of disk space to allocate for the job.intgetGpu()Get the number of GPUs.org.springframework.util.unit.DataSizegetMemory()Get the default amount of memory.org.springframework.util.unit.DataSizegetNetwork()Get the network bandwidth that should be allocated for the job.voidsetCpu(@Min(1L) java.lang.Integer cpu)Set the new default CPU value.voidsetDisk(org.springframework.util.unit.DataSize disk)Set the new disk size.voidsetGpu(@Min(0L) java.lang.Integer gpu)Set the new default amount of GPUs.voidsetMemory(org.springframework.util.unit.DataSize memory)Set the default amount of memory for the job runtime.voidsetNetwork(org.springframework.util.unit.DataSize network)Set the new network bandwidth default for jobs.
-
-
-
Method Detail
-
getCpu
public int getCpu()
Get the default number of CPUs.- Returns:
- The default number of CPUs
-
setCpu
public void setCpu(@Min(1L) @Nullable @Min(1L) java.lang.Integer cpu)Set the new default CPU value.- Parameters:
cpu- The cpu value or null
-
getGpu
public int getGpu()
Get the number of GPUs.- Returns:
- The number of GPUs.
-
setGpu
public void setGpu(@Min(0L) @Nullable @Min(0L) java.lang.Integer gpu)Set the new default amount of GPUs.- Parameters:
gpu- The new number of GPUs or null to set back to default
-
getMemory
public org.springframework.util.unit.DataSize getMemory()
Get the default amount of memory.- Returns:
- The amount of memory as a
DataSizeinstance
-
setMemory
public void setMemory(@Nullable org.springframework.util.unit.DataSize memory)Set the default amount of memory for the job runtime.- Parameters:
memory- The new amount of memory or null to reset to default
-
getDisk
public org.springframework.util.unit.DataSize getDisk()
Get the amount of disk space to allocate for the job.- Returns:
- The disk space as
DataSizeinstance
-
setDisk
public void setDisk(@Nullable org.springframework.util.unit.DataSize disk)Set the new disk size.- Parameters:
disk- The new disk size or null to set back to default
-
getNetwork
public org.springframework.util.unit.DataSize getNetwork()
Get the network bandwidth that should be allocated for the job.- Returns:
- The network bandwidth as a
DataSizeinstance that should be converted to something like Mbps
-
setNetwork
public void setNetwork(@Nullable org.springframework.util.unit.DataSize network)Set the new network bandwidth default for jobs.- Parameters:
network- The new default or if null revert to hardcoded default
-
-