Class ClusterAutoscalingConfig
- java.lang.Object
-
- com.google.cloud.bigtable.admin.v2.models.ClusterAutoscalingConfig
-
public class ClusterAutoscalingConfig extends Object
Model class to create an autoscaling config for creating or updating a cluster. When creating this config, min nodes, max nodes, and CPU utilization must all be set.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetClusterId()The cluster id to set autoscaling onintgetCpuUtilizationTargetPercent()Get the CPU utilization that the Autoscaler should be trying to achieve.StringgetInstanceId()The instance id of the cluster to set autoscaling onintgetMaxNodes()Get the maximum number of nodes to scale up to.intgetMinNodes()Get the minimum number of nodes to scale down to.intgetStorageUtilizationGibPerNode()Get the storage utilization that the Autoscaler should be trying to achieve.inthashCode()static ClusterAutoscalingConfigof(String instanceId, String clusterId)ClusterAutoscalingConfigsetCpuUtilizationTargetPercent(int cpuUtilizationTargetPercent)Set the CPU utilization that the Autoscaler should be trying to achieve.ClusterAutoscalingConfigsetMaxNodes(int maxNodes)Set the maximum number of nodes to scale up to.ClusterAutoscalingConfigsetMinNodes(int minNodes)Set the minimum number of nodes to scale down to.ClusterAutoscalingConfigsetStorageUtilizationGibPerNode(int storageUtilizationGibPerNode)PartialUpdateClusterRequesttoProto(String projectId)Creates the request protobuf.
-
-
-
Method Detail
-
of
public static ClusterAutoscalingConfig of(@Nonnull String instanceId, @Nonnull String clusterId)
-
getClusterId
public String getClusterId()
The cluster id to set autoscaling on
-
getInstanceId
public String getInstanceId()
The instance id of the cluster to set autoscaling on
-
setMinNodes
public ClusterAutoscalingConfig setMinNodes(int minNodes)
Set the minimum number of nodes to scale down to.
-
setMaxNodes
public ClusterAutoscalingConfig setMaxNodes(int maxNodes)
Set the maximum number of nodes to scale up to.
-
setCpuUtilizationTargetPercent
public ClusterAutoscalingConfig setCpuUtilizationTargetPercent(int cpuUtilizationTargetPercent)
Set the CPU utilization that the Autoscaler should be trying to achieve. This number is on a scale from 0 (no utilization) to 100 (total utilization).
-
setStorageUtilizationGibPerNode
public ClusterAutoscalingConfig setStorageUtilizationGibPerNode(int storageUtilizationGibPerNode)
-
getMinNodes
public int getMinNodes()
Get the minimum number of nodes to scale down to.
-
getMaxNodes
public int getMaxNodes()
Get the maximum number of nodes to scale up to.
-
getCpuUtilizationTargetPercent
public int getCpuUtilizationTargetPercent()
Get the CPU utilization that the Autoscaler should be trying to achieve. This number is on a scale from 0 (no utilization) to 100 (total utilization).
-
getStorageUtilizationGibPerNode
public int getStorageUtilizationGibPerNode()
Get the storage utilization that the Autoscaler should be trying to achieve. This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster; otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, it will be treated as if it were set to the default value: 2560 for SSD, 8192 for HDD.
-
toProto
@InternalApi public PartialUpdateClusterRequest toProto(String projectId)
Creates the request protobuf. This method is considered an internal implementation detail and not meant to be used by applications.
-
-