public class K8sScaler extends java.lang.Object implements IScalerPerCluster
Constructor and Description |
---|
K8sScaler(Config config,
JobAPI.Job job,
KubernetesController k8sController) |
Modifier and Type | Method and Description |
---|---|
boolean |
isScalable()
whether this job is scalable
|
boolean |
scaleDownWorkers(int instancesToRemove,
int numberOfWorkers)
remove workers from the scalable compute resource
|
boolean |
scaleUpWorkers(int instancesToAdd)
add new workers to the scalable compute resource
|
public K8sScaler(Config config, JobAPI.Job job, KubernetesController k8sController)
public boolean isScalable()
IScalerPerCluster
isScalable
in interface IScalerPerCluster
public boolean scaleUpWorkers(int instancesToAdd)
scaleUpWorkers
in interface IScalerPerCluster
public boolean scaleDownWorkers(int instancesToRemove, int numberOfWorkers)
scaleDownWorkers
in interface IScalerPerCluster
instancesToRemove
- numberOfWorkers
- number of workers before the scale down