Class InstanceGroupAutoscalingPolicyConfig

  • All Implemented Interfaces:
    InstanceGroupAutoscalingPolicyConfigOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class InstanceGroupAutoscalingPolicyConfig
    extends com.google.protobuf.GeneratedMessageV3
    implements InstanceGroupAutoscalingPolicyConfigOrBuilder
     Configuration for the size bounds of an instance group, including its
     proportional size to other groups.
     
    Protobuf type google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getMinInstances

        public int getMinInstances()
         Optional. Minimum number of instances for this group.
        
         Primary workers - Bounds: [2, max_instances]. Default: 2.
         Secondary workers - Bounds: [0, max_instances]. Default: 0.
         
        int32 min_instances = 1 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getMinInstances in interface InstanceGroupAutoscalingPolicyConfigOrBuilder
        Returns:
        The minInstances.
      • getMaxInstances

        public int getMaxInstances()
         Required. Maximum number of instances for this group. Required for primary
         workers. Note that by default, clusters will not use secondary workers.
         Required for secondary workers if the minimum secondary instances is set.
        
         Primary workers - Bounds: [min_instances, ).
         Secondary workers - Bounds: [min_instances, ). Default: 0.
         
        int32 max_instances = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getMaxInstances in interface InstanceGroupAutoscalingPolicyConfigOrBuilder
        Returns:
        The maxInstances.
      • getWeight

        public int getWeight()
         Optional. Weight for the instance group, which is used to determine the
         fraction of total workers in the cluster from this instance group.
         For example, if primary workers have weight 2, and secondary workers have
         weight 1, the cluster will have approximately 2 primary workers for each
         secondary worker.
        
         The cluster may not reach the specified balance if constrained
         by min/max bounds or other autoscaling settings. For example, if
         `max_instances` for secondary workers is 0, then only primary workers will
         be added. The cluster can also be out of balance when created.
        
         If weight is not set on any instance group, the cluster will default to
         equal weight for all groups: the cluster will attempt to maintain an equal
         number of workers in each group within the configured size bounds for each
         group. If weight is set for one group only, the cluster will default to
         zero weight on the unset group. For example if weight is set only on
         primary workers, the cluster will use primary workers only and no
         secondary workers.
         
        int32 weight = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getWeight in interface InstanceGroupAutoscalingPolicyConfigOrBuilder
        Returns:
        The weight.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static InstanceGroupAutoscalingPolicyConfig parseFrom​(ByteBuffer data,
                                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static InstanceGroupAutoscalingPolicyConfig parseFrom​(com.google.protobuf.ByteString data)
                                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static InstanceGroupAutoscalingPolicyConfig parseFrom​(com.google.protobuf.ByteString data,
                                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static InstanceGroupAutoscalingPolicyConfig parseFrom​(byte[] data)
                                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static InstanceGroupAutoscalingPolicyConfig parseFrom​(byte[] data,
                                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • newBuilderForType

        public InstanceGroupAutoscalingPolicyConfig.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected InstanceGroupAutoscalingPolicyConfig.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<InstanceGroupAutoscalingPolicyConfig> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public InstanceGroupAutoscalingPolicyConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder