Package com.netflix.genie.web.properties
Class JobResolutionProperties.Resources
java.lang.Object
com.netflix.genie.web.properties.JobResolutionProperties.Resources
- Enclosing class:
- JobResolutionProperties
Computation resource properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getCpu()
Get the default number of CPUs.org.springframework.util.unit.DataSize
getDisk()
Get the amount of disk space to allocate for the job.int
getGpu()
Get the number of GPUs.org.springframework.util.unit.DataSize
Get the default amount of memory.org.springframework.util.unit.DataSize
Get the network bandwidth that should be allocated for the job.void
Set the new default CPU value.void
setDisk
(org.springframework.util.unit.DataSize disk) Set the new disk size.void
Set the new default amount of GPUs.void
setMemory
(org.springframework.util.unit.DataSize memory) Set the default amount of memory for the job runtime.void
setNetwork
(org.springframework.util.unit.DataSize network) Set the new network bandwidth default for jobs.
-
Constructor Details
-
Resources
public Resources()
-
-
Method Details
-
getCpu
public int getCpu()Get the default number of CPUs.- Returns:
- The default number of CPUs
-
setCpu
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
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
DataSize
instance
-
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
DataSize
instance
-
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
DataSize
instance 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
-