logging

package
v0.0.0-...-989df2b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AutoscalerState_name = map[int32]string{
		0: "AUTOSCALER_STATE_UNSPECIFIED",
		1: "COOLDOWN",
		6: "RECOMMENDING",
		2: "SCALING",
		3: "STOPPED",
		4: "FAILED",
		5: "INITIALIZING",
	}
	AutoscalerState_value = map[string]int32{
		"AUTOSCALER_STATE_UNSPECIFIED": 0,
		"COOLDOWN":                     1,
		"RECOMMENDING":                 6,
		"SCALING":                      2,
		"STOPPED":                      3,
		"FAILED":                       4,
		"INITIALIZING":                 5,
	}
)

Enum value maps for AutoscalerState.

View Source
var (
	ScalingDecisionType_name = map[int32]string{
		0: "SCALING_DECISION_TYPE_UNSPECIFIED",
		1: "SCALE_UP",
		2: "SCALE_DOWN",
		3: "NO_SCALE",
		4: "MIXED",
	}
	ScalingDecisionType_value = map[string]int32{
		"SCALING_DECISION_TYPE_UNSPECIFIED": 0,
		"SCALE_UP":                          1,
		"SCALE_DOWN":                        2,
		"NO_SCALE":                          3,
		"MIXED":                             4,
	}
)

Enum value maps for ScalingDecisionType.

View Source
var (
	ConstrainingFactor_name = map[int32]string{
		0: "CONSTRAINING_FACTOR_UNSPECIFIED",
		1: "SCALING_CAPPED_DUE_TO_LACK_OF_QUOTA",
		2: "REACHED_MAXIMUM_CLUSTER_SIZE",
		3: "REACHED_MINIMUM_CLUSTER_SIZE",
	}
	ConstrainingFactor_value = map[string]int32{
		"CONSTRAINING_FACTOR_UNSPECIFIED":     0,
		"SCALING_CAPPED_DUE_TO_LACK_OF_QUOTA": 1,
		"REACHED_MAXIMUM_CLUSTER_SIZE":        2,
		"REACHED_MINIMUM_CLUSTER_SIZE":        3,
	}
)

Enum value maps for ConstrainingFactor.

View Source
var File_google_cloud_dataproc_logging_autoscaler_log_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AutoscalerLog

type AutoscalerLog struct {

	// The current Autoscaler status.
	Status *AutoscalerStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// Optional. The autoscaling recommendation including its inputs, outputs,
	// scaling decision, and detailed explanation.
	Recommendation *AutoscalerRecommendation `protobuf:"bytes,2,opt,name=recommendation,proto3" json:"recommendation,omitempty"`
	// contains filtered or unexported fields
}

The main proto that will be converted to JSON format and then written to Logging.

func (*AutoscalerLog) Descriptor deprecated

func (*AutoscalerLog) Descriptor() ([]byte, []int)

Deprecated: Use AutoscalerLog.ProtoReflect.Descriptor instead.

func (*AutoscalerLog) GetRecommendation

func (x *AutoscalerLog) GetRecommendation() *AutoscalerRecommendation

func (*AutoscalerLog) GetStatus

func (x *AutoscalerLog) GetStatus() *AutoscalerStatus

func (*AutoscalerLog) ProtoMessage

func (*AutoscalerLog) ProtoMessage()

func (*AutoscalerLog) ProtoReflect

func (x *AutoscalerLog) ProtoReflect() protoreflect.Message

func (*AutoscalerLog) Reset

func (x *AutoscalerLog) Reset()

func (*AutoscalerLog) String

func (x *AutoscalerLog) String() string

type AutoscalerRecommendation

type AutoscalerRecommendation struct {

	// The autoscaling algorithm inputs.
	Inputs *AutoscalerRecommendation_Inputs `protobuf:"bytes,1,opt,name=inputs,proto3" json:"inputs,omitempty"`
	// The algorithm outputs for the recommended cluster size.
	Outputs *AutoscalerRecommendation_Outputs `protobuf:"bytes,2,opt,name=outputs,proto3" json:"outputs,omitempty"`
	// contains filtered or unexported fields
}

The inputs, outputs, and detailed explanation of the Autoscaling recommendation.

func (*AutoscalerRecommendation) Descriptor deprecated

func (*AutoscalerRecommendation) Descriptor() ([]byte, []int)

Deprecated: Use AutoscalerRecommendation.ProtoReflect.Descriptor instead.

func (*AutoscalerRecommendation) GetInputs

func (*AutoscalerRecommendation) GetOutputs

func (*AutoscalerRecommendation) ProtoMessage

func (*AutoscalerRecommendation) ProtoMessage()

func (*AutoscalerRecommendation) ProtoReflect

func (x *AutoscalerRecommendation) ProtoReflect() protoreflect.Message

func (*AutoscalerRecommendation) Reset

func (x *AutoscalerRecommendation) Reset()

func (*AutoscalerRecommendation) String

func (x *AutoscalerRecommendation) String() string

type AutoscalerRecommendation_Inputs

type AutoscalerRecommendation_Inputs struct {

	// The metrics collected by the Dataproc agent running on the cluster.
	// For example, {"avg-yarn-pending-memory": "1040 MB"}
	ClusterMetrics map[string]string `` /* 191-byte string literal not displayed */
	// The cluster configuration before updating the cluster.
	CurrentClusterSize *ClusterSize `protobuf:"bytes,2,opt,name=current_cluster_size,json=currentClusterSize,proto3" json:"current_cluster_size,omitempty"`
	// The minimum worker counts for each instance group.
	MinWorkerCounts *ClusterSize `protobuf:"bytes,3,opt,name=min_worker_counts,json=minWorkerCounts,proto3" json:"min_worker_counts,omitempty"`
	// The maximum worker counts for each instance group.
	MaxWorkerCounts *ClusterSize `protobuf:"bytes,4,opt,name=max_worker_counts,json=maxWorkerCounts,proto3" json:"max_worker_counts,omitempty"`
	// contains filtered or unexported fields
}

The input values for the Autoscaling recommendation alogirthm.

func (*AutoscalerRecommendation_Inputs) Descriptor deprecated

func (*AutoscalerRecommendation_Inputs) Descriptor() ([]byte, []int)

Deprecated: Use AutoscalerRecommendation_Inputs.ProtoReflect.Descriptor instead.

func (*AutoscalerRecommendation_Inputs) GetClusterMetrics

func (x *AutoscalerRecommendation_Inputs) GetClusterMetrics() map[string]string

func (*AutoscalerRecommendation_Inputs) GetCurrentClusterSize

func (x *AutoscalerRecommendation_Inputs) GetCurrentClusterSize() *ClusterSize

func (*AutoscalerRecommendation_Inputs) GetMaxWorkerCounts

func (x *AutoscalerRecommendation_Inputs) GetMaxWorkerCounts() *ClusterSize

func (*AutoscalerRecommendation_Inputs) GetMinWorkerCounts

func (x *AutoscalerRecommendation_Inputs) GetMinWorkerCounts() *ClusterSize

func (*AutoscalerRecommendation_Inputs) ProtoMessage

func (*AutoscalerRecommendation_Inputs) ProtoMessage()

func (*AutoscalerRecommendation_Inputs) ProtoReflect

func (*AutoscalerRecommendation_Inputs) Reset

func (*AutoscalerRecommendation_Inputs) String

type AutoscalerRecommendation_Outputs

type AutoscalerRecommendation_Outputs struct {

	// The high-level autoscaling decision, such as SCALE_UP, SCALE_DOWN,
	// NO_OP.
	Decision ScalingDecisionType `protobuf:"varint,1,opt,name=decision,proto3,enum=google.cloud.dataproc.logging.ScalingDecisionType" json:"decision,omitempty"`
	// The recommended cluster size.
	RecommendedClusterSize *ClusterSize `` /* 129-byte string literal not displayed */
	// The graceful decommission timeout for downscaling operations.
	GracefulDecommissionTimeout *durationpb.Duration `` /* 144-byte string literal not displayed */
	// Reasons why the Autoscaler didn't add or remove more workers.
	ConstraintsReached []ConstrainingFactor `` /* 177-byte string literal not displayed */
	// Less significant recommendations that are not included in the
	// `AutoscalerStatus.details` message.
	AdditionalRecommendationDetails []string `` /* 156-byte string literal not displayed */
	// A unique id for this recommendation that should be included when opening
	// a support ticket.
	RecommendationId string `protobuf:"bytes,6,opt,name=recommendation_id,json=recommendationId,proto3" json:"recommendation_id,omitempty"`
	// contains filtered or unexported fields
}

Autoscaler recommendations.

func (*AutoscalerRecommendation_Outputs) Descriptor deprecated

func (*AutoscalerRecommendation_Outputs) Descriptor() ([]byte, []int)

Deprecated: Use AutoscalerRecommendation_Outputs.ProtoReflect.Descriptor instead.

func (*AutoscalerRecommendation_Outputs) GetAdditionalRecommendationDetails

func (x *AutoscalerRecommendation_Outputs) GetAdditionalRecommendationDetails() []string

func (*AutoscalerRecommendation_Outputs) GetConstraintsReached

func (x *AutoscalerRecommendation_Outputs) GetConstraintsReached() []ConstrainingFactor

func (*AutoscalerRecommendation_Outputs) GetDecision

func (*AutoscalerRecommendation_Outputs) GetGracefulDecommissionTimeout

func (x *AutoscalerRecommendation_Outputs) GetGracefulDecommissionTimeout() *durationpb.Duration

func (*AutoscalerRecommendation_Outputs) GetRecommendationId

func (x *AutoscalerRecommendation_Outputs) GetRecommendationId() string

func (*AutoscalerRecommendation_Outputs) GetRecommendedClusterSize

func (x *AutoscalerRecommendation_Outputs) GetRecommendedClusterSize() *ClusterSize

func (*AutoscalerRecommendation_Outputs) ProtoMessage

func (*AutoscalerRecommendation_Outputs) ProtoMessage()

func (*AutoscalerRecommendation_Outputs) ProtoReflect

func (*AutoscalerRecommendation_Outputs) Reset

func (*AutoscalerRecommendation_Outputs) String

type AutoscalerState

type AutoscalerState int32

The Autoscaler state.

const (
	AutoscalerState_AUTOSCALER_STATE_UNSPECIFIED AutoscalerState = 0
	// The Autoscaler is sleeping and waiting for the next update.
	AutoscalerState_COOLDOWN AutoscalerState = 1
	// The Autoscaler is in the process of calculating its recommendation on
	// whether to scale the cluster, and if so, how to autoscale.
	AutoscalerState_RECOMMENDING AutoscalerState = 6
	// The Autoscaler is scaling the cluster.
	AutoscalerState_SCALING AutoscalerState = 2
	// The Autoscaler has stopped.
	AutoscalerState_STOPPED AutoscalerState = 3
	// The Autoscaler has failed.
	AutoscalerState_FAILED AutoscalerState = 4
	// The Autoscaler is initializing.
	AutoscalerState_INITIALIZING AutoscalerState = 5
)

func (AutoscalerState) Descriptor

func (AutoscalerState) Enum

func (x AutoscalerState) Enum() *AutoscalerState

func (AutoscalerState) EnumDescriptor deprecated

func (AutoscalerState) EnumDescriptor() ([]byte, []int)

Deprecated: Use AutoscalerState.Descriptor instead.

func (AutoscalerState) Number

func (AutoscalerState) String

func (x AutoscalerState) String() string

func (AutoscalerState) Type

type AutoscalerStatus

type AutoscalerStatus struct {

	// The high-level Autoscaler state.
	State AutoscalerState `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.dataproc.logging.AutoscalerState" json:"state,omitempty"`
	// The detailed description of Autoscaler status.
	Details string `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"`
	// The cluster update operation ID.
	UpdateClusterOperationId string `` /* 137-byte string literal not displayed */
	// Error message from an Autoscaler exception, if any.
	Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

The Autoscaler's status, including its state and other details.

func (*AutoscalerStatus) Descriptor deprecated

func (*AutoscalerStatus) Descriptor() ([]byte, []int)

Deprecated: Use AutoscalerStatus.ProtoReflect.Descriptor instead.

func (*AutoscalerStatus) GetDetails

func (x *AutoscalerStatus) GetDetails() string

func (*AutoscalerStatus) GetError

func (x *AutoscalerStatus) GetError() string

func (*AutoscalerStatus) GetState

func (x *AutoscalerStatus) GetState() AutoscalerState

func (*AutoscalerStatus) GetUpdateClusterOperationId

func (x *AutoscalerStatus) GetUpdateClusterOperationId() string

func (*AutoscalerStatus) ProtoMessage

func (*AutoscalerStatus) ProtoMessage()

func (*AutoscalerStatus) ProtoReflect

func (x *AutoscalerStatus) ProtoReflect() protoreflect.Message

func (*AutoscalerStatus) Reset

func (x *AutoscalerStatus) Reset()

func (*AutoscalerStatus) String

func (x *AutoscalerStatus) String() string

type ClusterSize

type ClusterSize struct {

	// The number of primary workers in the cluster.
	PrimaryWorkerCount int32 `protobuf:"varint,1,opt,name=primary_worker_count,json=primaryWorkerCount,proto3" json:"primary_worker_count,omitempty"`
	// The number of secondary workers in the cluster.
	SecondaryWorkerCount int32 `protobuf:"varint,2,opt,name=secondary_worker_count,json=secondaryWorkerCount,proto3" json:"secondary_worker_count,omitempty"`
	// contains filtered or unexported fields
}

The short version of cluster configuration for Cloud logging.

func (*ClusterSize) Descriptor deprecated

func (*ClusterSize) Descriptor() ([]byte, []int)

Deprecated: Use ClusterSize.ProtoReflect.Descriptor instead.

func (*ClusterSize) GetPrimaryWorkerCount

func (x *ClusterSize) GetPrimaryWorkerCount() int32

func (*ClusterSize) GetSecondaryWorkerCount

func (x *ClusterSize) GetSecondaryWorkerCount() int32

func (*ClusterSize) ProtoMessage

func (*ClusterSize) ProtoMessage()

func (*ClusterSize) ProtoReflect

func (x *ClusterSize) ProtoReflect() protoreflect.Message

func (*ClusterSize) Reset

func (x *ClusterSize) Reset()

func (*ClusterSize) String

func (x *ClusterSize) String() string

type ConstrainingFactor

type ConstrainingFactor int32
const (
	ConstrainingFactor_CONSTRAINING_FACTOR_UNSPECIFIED ConstrainingFactor = 0
	// The project does not have sufficient regional, global, and or preemptible
	// quota to allocate a new VM.
	ConstrainingFactor_SCALING_CAPPED_DUE_TO_LACK_OF_QUOTA ConstrainingFactor = 1
	// All worker groups have reached maximum size. This message will not be
	// issued if one group reached maximum size, but workers were able to be
	// allocated to another group.
	ConstrainingFactor_REACHED_MAXIMUM_CLUSTER_SIZE ConstrainingFactor = 2
	// All worker groups have reached minimum size. This message will not be
	// issued if workers were able to be removed from another group that had not
	// reached minimum size.
	ConstrainingFactor_REACHED_MINIMUM_CLUSTER_SIZE ConstrainingFactor = 3
)

func (ConstrainingFactor) Descriptor

func (ConstrainingFactor) Enum

func (ConstrainingFactor) EnumDescriptor deprecated

func (ConstrainingFactor) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConstrainingFactor.Descriptor instead.

func (ConstrainingFactor) Number

func (ConstrainingFactor) String

func (x ConstrainingFactor) String() string

func (ConstrainingFactor) Type

type ScalingDecisionType

type ScalingDecisionType int32

The Autoscaling decision type.

const (
	ScalingDecisionType_SCALING_DECISION_TYPE_UNSPECIFIED ScalingDecisionType = 0
	// Increase the number of primary and/or secondary workers.
	ScalingDecisionType_SCALE_UP ScalingDecisionType = 1
	// Decrease the number of primary and/or secondary workers.
	ScalingDecisionType_SCALE_DOWN ScalingDecisionType = 2
	// Not changing the number of primary or secondary workers.
	ScalingDecisionType_NO_SCALE ScalingDecisionType = 3
	// Scale the primary and secondary worker groups in different directions.
	ScalingDecisionType_MIXED ScalingDecisionType = 4
)

func (ScalingDecisionType) Descriptor

func (ScalingDecisionType) Enum

func (ScalingDecisionType) EnumDescriptor deprecated

func (ScalingDecisionType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ScalingDecisionType.Descriptor instead.

func (ScalingDecisionType) Number

func (ScalingDecisionType) String

func (x ScalingDecisionType) String() string

func (ScalingDecisionType) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL