Class ClusterAutoscalingConfig (2.31.0)

public class ClusterAutoscalingConfig

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.

Inheritance

Object > ClusterAutoscalingConfig

Static Methods

of(String instanceId, String clusterId)

public static ClusterAutoscalingConfig of(String instanceId, String clusterId)
Parameters
NameDescription
instanceIdString
clusterIdString
Returns
TypeDescription
ClusterAutoscalingConfig

Methods

equals(Object o)

public boolean equals(Object o)
Parameter
NameDescription
oObject
Returns
TypeDescription
boolean
Overrides

getClusterId()

public String getClusterId()

The cluster id to set autoscaling on

Returns
TypeDescription
String

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).

Returns
TypeDescription
int

getInstanceId()

public String getInstanceId()

The instance id of the cluster to set autoscaling on

Returns
TypeDescription
String

getMaxNodes()

public int getMaxNodes()

Get the maximum number of nodes to scale up to.

Returns
TypeDescription
int

getMinNodes()

public int getMinNodes()

Get the minimum number of nodes to scale down to.

Returns
TypeDescription
int

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.

Returns
TypeDescription
int

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

setCpuUtilizationTargetPercent(int cpuUtilizationTargetPercent)

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).

Parameter
NameDescription
cpuUtilizationTargetPercentint
Returns
TypeDescription
ClusterAutoscalingConfig

setMaxNodes(int maxNodes)

public ClusterAutoscalingConfig setMaxNodes(int maxNodes)

Set the maximum number of nodes to scale up to.

Parameter
NameDescription
maxNodesint
Returns
TypeDescription
ClusterAutoscalingConfig

setMinNodes(int minNodes)

public ClusterAutoscalingConfig setMinNodes(int minNodes)

Set the minimum number of nodes to scale down to.

Parameter
NameDescription
minNodesint
Returns
TypeDescription
ClusterAutoscalingConfig

setStorageUtilizationGibPerNode(int storageUtilizationGibPerNode)

public ClusterAutoscalingConfig setStorageUtilizationGibPerNode(int storageUtilizationGibPerNode)
Parameter
NameDescription
storageUtilizationGibPerNodeint
Returns
TypeDescription
ClusterAutoscalingConfig

toProto(String projectId)

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.

Parameter
NameDescription
projectIdString
Returns
TypeDescription
com.google.bigtable.admin.v2.PartialUpdateClusterRequest