sparkapplication

package
v0.0.0-...-43c1888 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventFilter

type EventFilter struct {
	// contains filtered or unexported fields
}

func NewSparkApplicationEventFilter

func NewSparkApplicationEventFilter(client client.Client, recorder record.EventRecorder, namespaces []string) *EventFilter

func (*EventFilter) Create

func (f *EventFilter) Create(e event.CreateEvent) bool

Create implements predicate.Predicate.

func (*EventFilter) Delete

func (f *EventFilter) Delete(e event.DeleteEvent) bool

Delete implements predicate.Predicate.

func (*EventFilter) Generic

func (f *EventFilter) Generic(e event.GenericEvent) bool

Generic implements predicate.Predicate.

func (*EventFilter) Update

func (f *EventFilter) Update(e event.UpdateEvent) bool

Update implements predicate.Predicate.

type EventHandler

type EventHandler struct {
	// contains filtered or unexported fields
}

EventHandler watches SparkApplication events.

func NewSparkApplicationEventHandler

func NewSparkApplicationEventHandler(metrics *metrics.SparkApplicationMetrics) *EventHandler

NewSparkApplicationEventHandler creates a new SparkApplicationEventHandler instance.

func (*EventHandler) Create

Create implements handler.EventHandler.

func (*EventHandler) Delete

Delete implements handler.EventHandler.

func (*EventHandler) Generic

Generic implements handler.EventHandler.

func (*EventHandler) Update

Update implements handler.EventHandler.

type Options

type Options struct {
	Namespaces            []string
	EnableUIService       bool
	IngressClassName      string
	IngressURLFormat      string
	DefaultBatchScheduler string

	KubeSchedulerNames []string

	SparkApplicationMetrics *metrics.SparkApplicationMetrics
	SparkExecutorMetrics    *metrics.SparkExecutorMetrics

	MaxTrackedExecutorPerApp int
}

Options defines the options of the controller.

type Reconciler

type Reconciler struct {
	// contains filtered or unexported fields
}

Reconciler reconciles a SparkApplication object.

func NewReconciler

func NewReconciler(
	manager ctrl.Manager,
	scheme *runtime.Scheme,
	client client.Client,
	recorder record.EventRecorder,
	registry *scheduler.Registry,
	options Options,
) *Reconciler

NewReconciler creates a new Reconciler instance.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile handles Create, Update and Delete events of the custom resource. State Machine for SparkApplication: +--------------------------------------------------------------------------------------------------------------------+ | +---------------------------------------------------------------------------------------------+ | | | +----------+ | | | | | | | | | | | | | | | | |Submission| | | | | +----> Failed +----+------------------------------------------------------------------+ | | | | | | | | | | | | | | | | | | | | | | | +----^-----+ | +-----------------------------------------+ | | | | | | | | | | | | | | | | | | | | | | | | +-+--+----+ | +-----v--+-+ +----------+ +-----v-----+ +----v--v--+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New +---------> Submitted+----------> Running +-----------> Failing +----------> Failed | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------+ | +----^-----+ +-----+----+ +-----+-----+ +----------+ | | | | | | | | | | | | | | +------------+ | | +-------------------------------+ | | | | | +-----+-----+ | | +-----------+ +----------+ | | | | | | Pending | | | | | | | | | | | +---+ Rerun <-------+ +---------------->Succeeding +---------->Completed | | | |Invalidating| | <-------+ | | | | | | | +-------> | | | | | | | | | | | | | | | | | | | | | +-----------+ | +-----+-----+ +----------+ | | +------------+ | | | | | | | | +-------------------------------+ | | | +--------------------------------------------------------------------------------------------------------------------+

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, options controller.Options) error

SetupWithManager sets up the controller with the Manager.

type SparkIngress

type SparkIngress struct {
	// contains filtered or unexported fields
}

SparkIngress encapsulates information about the driver UI ingress.

type SparkPodEventHandler

type SparkPodEventHandler struct {
	// contains filtered or unexported fields
}

SparkPodEventHandler watches Spark pods and update the SparkApplication objects accordingly.

func NewSparkPodEventHandler

func NewSparkPodEventHandler(client client.Client, metrics *metrics.SparkExecutorMetrics) *SparkPodEventHandler

NewSparkPodEventHandler creates a new sparkPodEventHandler instance.

func (*SparkPodEventHandler) Create

Create implements handler.EventHandler.

func (*SparkPodEventHandler) Delete

Delete implements handler.EventHandler.

func (*SparkPodEventHandler) Generic

Generic implements handler.EventHandler.

func (*SparkPodEventHandler) Update

Update implements handler.EventHandler.

type SparkService

type SparkService struct {
	// contains filtered or unexported fields
}

SparkService encapsulates information about the driver UI service.

type Validator

type Validator struct{}

func (*Validator) ValidateCreate

func (s *Validator) ValidateCreate(_ context.Context, _ runtime.Object) (admission.Warnings, error)

ValidateCreate implements admission.CustomValidator.

func (*Validator) ValidateDelete

func (s *Validator) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)

ValidateDelete implements admission.CustomValidator.

func (*Validator) ValidateUpdate

func (s *Validator) ValidateUpdate(_ context.Context, _ runtime.Object, _ runtime.Object) (admission.Warnings, error)

ValidateUpdate implements admission.CustomValidator.

Jump to

Keyboard shortcuts

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