Documentation ¶
Index ¶
- func CollocationTypeTag(ctx context.Context, collocationType string) metrics.Tag
- func HostTag(ctx context.Context, host string) metrics.Tag
- func IncrementSingleAzDynamicAllocationPackFailure(ctx context.Context, zone string)
- func InstanceGroupTag(ctx context.Context, instanceGroup string) metrics.Tag
- func OutcomeTag(ctx context.Context, outcome string) metrics.Tag
- func PathTag(ctx context.Context, url url.URL) metrics.Tag
- func QueueIndexTag(ctx context.Context, index int) metrics.Tag
- func RegisterInformerDelayMetrics(ctx context.Context, informer coreinformers.PodInformer)
- func ReportCrossZoneMetric(ctx context.Context, instanceGroup string, driverNodeName string, ...)
- func ReportInitialDriverExecutorCollocationMetric(ctx context.Context, instanceGroup string, driverNodeName string, ...)
- func ReportInitialNodeCountMetrics(ctx context.Context, instanceGroup string, executorNodeNames []string)
- func ReportPackingEfficiency(ctx context.Context, instanceGroupName string, packingFunctionName string, ...)
- func ReportTimeToFirstBindMetrics(ctx context.Context, duration time.Duration)
- func SparkRoleTag(ctx context.Context, role string) metrics.Tag
- func StatusCodeTag(ctx context.Context, statusCode string) metrics.Tag
- func VerbTag(ctx context.Context, verb string) metrics.Tag
- func ZoneTag(ctx context.Context, zone string) metrics.Tag
- type CacheMetrics
- type PendingPodQueueReporter
- type PodHistograms
- type PodTags
- type ResourceReservationMetrics
- type ResourceUsageReporter
- type ScheduleTimer
- type SoftReservationCompactionTimer
- type SoftReservationMetrics
- type SparkPodConditions
- type WasteMetricsReporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollocationTypeTag ¶ added in v0.56.0
CollocationTypeTag returns a collocation type tag
func IncrementSingleAzDynamicAllocationPackFailure ¶ added in v0.47.0
IncrementSingleAzDynamicAllocationPackFailure increments a counter for a zone we fail to schedule in, this allows us to keep track of exactly which zones are over utilised
func InstanceGroupTag ¶
InstanceGroupTag returns an instance group tag
func OutcomeTag ¶
OutcomeTag returns an outcome tag
func QueueIndexTag ¶
QueueIndexTag returns a queue index tag
func RegisterInformerDelayMetrics ¶
func RegisterInformerDelayMetrics(ctx context.Context, informer coreinformers.PodInformer)
RegisterInformerDelayMetrics registers an event handler to the pod informer to report delays
func ReportCrossZoneMetric ¶
func ReportCrossZoneMetric(ctx context.Context, instanceGroup string, driverNodeName string, executorNodeNames []string, nodes []*v1.Node)
ReportCrossZoneMetric reports metric about cross AZ traffic between pods of a spark application
func ReportInitialDriverExecutorCollocationMetric ¶ added in v0.56.0
func ReportInitialDriverExecutorCollocationMetric(ctx context.Context, instanceGroup string, driverNodeName string, executorNodeNames []string)
ReportInitialDriverExecutorCollocationMetric reports a metric about whether the driver is collocated with executors. This metric is only reported during the initial scheduling of the Spark application.
func ReportInitialNodeCountMetrics ¶ added in v0.57.0
func ReportInitialNodeCountMetrics(ctx context.Context, instanceGroup string, executorNodeNames []string)
ReportInitialNodeCountMetrics reports two metrics used to reason about how fragmented a Spark app is.
The first metric measures how many executors are hosted per node for a given spark application. This ignores executor-less applications.
For instance for an application with 6 executors being scheduled on a single node the metric would be 6, if this application was instead scheduled on 2 nodes, then the metric would be 3.
The second metric simply tracks how many unique nodes are being used to schedule all the executors.
Those metrics are only reported during the initial scheduling of the Spark application.
func ReportPackingEfficiency ¶ added in v0.47.0
func ReportPackingEfficiency( ctx context.Context, instanceGroupName string, packingFunctionName string, efficiency binpack.AvgPackingEfficiency)
ReportPackingEfficiency report packing efficiency metrics for a single packing result.
func ReportTimeToFirstBindMetrics ¶ added in v0.59.0
ReportTimeToFirstBindMetrics reports how long it takes between a reservation being created and pods being bound to said reservation.
func SparkRoleTag ¶
SparkRoleTag returns a spark role tag
func StatusCodeTag ¶
StatusCodeTag returns a status code tag
Types ¶
type CacheMetrics ¶
type CacheMetrics struct {
// contains filtered or unexported fields
}
CacheMetrics reports metrics for resource reservation and demand caches
func NewCacheMetrics ¶
func NewCacheMetrics( resourceReservationLister sparkschedulerlisters.ResourceReservationLister, resourceReservations *cache.ResourceReservationCache, demands *cache.SafeDemandCache, ) *CacheMetrics
NewCacheMetrics creates a new CacheMetrics object
func (*CacheMetrics) StartReporting ¶
func (c *CacheMetrics) StartReporting(ctx context.Context)
StartReporting starts periodic reporting for cache metrics
type PendingPodQueueReporter ¶
type PendingPodQueueReporter struct {
// contains filtered or unexported fields
}
PendingPodQueueReporter reports queue sizes periodically
func NewQueueReporter ¶
func NewQueueReporter(podLister corelisters.PodLister, instanceGroupTagLabel string) *PendingPodQueueReporter
NewQueueReporter returns a new ResourceUsageReporter instance
func (*PendingPodQueueReporter) StartReportingQueues ¶
func (r *PendingPodQueueReporter) StartReportingQueues(ctx context.Context)
StartReportingQueues starts periodic resource usage reporting
type PodHistograms ¶
type PodHistograms map[PodTags]histogramWithCount
PodHistograms keep the count and duration of lifecycle states of a spark pod
func (PodHistograms) Inc ¶
func (p PodHistograms) Inc(key PodTags)
Inc increases the counter of the given key by one
type ResourceReservationMetrics ¶ added in v0.58.0
type ResourceReservationMetrics struct {
// contains filtered or unexported fields
}
ResourceReservationMetrics reports metrics on the ResourceReservationManager passed
func NewResourceReservationMetrics ¶ added in v0.58.0
func NewResourceReservationMetrics(resourceReservationCache *cache.ResourceReservationCache) *ResourceReservationMetrics
NewResourceReservationMetrics creates a ResourceReservationMetrics
func (*ResourceReservationMetrics) StartReporting ¶ added in v0.58.0
func (s *ResourceReservationMetrics) StartReporting(ctx context.Context)
StartReporting starts periodic reporting for ResourceReservationManager metrics
type ResourceUsageReporter ¶
type ResourceUsageReporter struct {
// contains filtered or unexported fields
}
ResourceUsageReporter reports resource usage periodically
func NewResourceReporter ¶
func NewResourceReporter( nodeLister corelisters.NodeLister, resourceReservations *cache.ResourceReservationCache, instanceGroupTagLabel string) *ResourceUsageReporter
NewResourceReporter returns a new ResourceUsageReporter instance
func (*ResourceUsageReporter) StartReportingResourceUsage ¶
func (r *ResourceUsageReporter) StartReportingResourceUsage(ctx context.Context)
StartReportingResourceUsage starts periodic resource usage reporting
type ScheduleTimer ¶
type ScheduleTimer struct {
// contains filtered or unexported fields
}
ScheduleTimer marks pod scheduling time metrics
func NewScheduleTimer ¶
NewScheduleTimer creates a new ScheduleTimer
func (*ScheduleTimer) Mark ¶
func (s *ScheduleTimer) Mark(ctx context.Context, role, outcome string)
Mark marks scheduling timer metrics with durations from current time
func (*ScheduleTimer) MarkReconciliationFinished ¶
func (s *ScheduleTimer) MarkReconciliationFinished(ctx context.Context)
MarkReconciliationFinished marks when the reconciliation finished successfully
type SoftReservationCompactionTimer ¶
type SoftReservationCompactionTimer struct {
// contains filtered or unexported fields
}
SoftReservationCompactionTimer tracks and reports the time it takes to compact soft reservations to resource reservations
func GetAndStartSoftReservationCompactionTimer ¶
func GetAndStartSoftReservationCompactionTimer() *SoftReservationCompactionTimer
GetAndStartSoftReservationCompactionTimer returns a SoftReservationCompactionTimer which starts counting the time immediately
func (*SoftReservationCompactionTimer) MarkCompactionComplete ¶
func (dct *SoftReservationCompactionTimer) MarkCompactionComplete(ctx context.Context)
MarkCompactionComplete emits a metric with the time difference between now and when the timer was started by GetAndStartSoftReservationCompactionTimer()
type SoftReservationMetrics ¶
type SoftReservationMetrics struct {
// contains filtered or unexported fields
}
SoftReservationMetrics reports metrics on the SoftReservationStore passed
func NewSoftReservationMetrics ¶
func NewSoftReservationMetrics(ctx context.Context, store *cache.SoftReservationStore, podLister corelisters.PodLister, resourceReservations *cache.ResourceReservationCache) *SoftReservationMetrics
NewSoftReservationMetrics creates a SoftReservationMetrics
func (*SoftReservationMetrics) StartReporting ¶
func (s *SoftReservationMetrics) StartReporting(ctx context.Context)
StartReporting starts periodic reporting for SoftReservationStore metrics
type SparkPodConditions ¶
type SparkPodConditions map[v1.PodConditionType]v1.PodCondition
SparkPodConditions provides spark related lifecycle events from pod conditions
func NewSparkPodConditions ¶
func NewSparkPodConditions(conditions []v1.PodCondition) SparkPodConditions
NewSparkPodConditions creates a new SparkPodConditions instance
func (SparkPodConditions) TimeWhenTrue ¶
func (s SparkPodConditions) TimeWhenTrue(conditionType v1.PodConditionType) (time.Time, bool)
TimeWhenTrue returns the last transition time if the given conditions status is true
type WasteMetricsReporter ¶
type WasteMetricsReporter struct {
// contains filtered or unexported fields
}
WasteMetricsReporter tracks and reports on scheduler latencies between demand creation and pod scheduling times in granular phases so we can keep track of any delays. This is a best-effort reporter in that it keeps track of state in memory.
func NewWasteMetricsReporter ¶
func NewWasteMetricsReporter(ctx context.Context, instanceGroupLabel string) *WasteMetricsReporter
NewWasteMetricsReporter returns an instance of WasteMetricsReporter
func (*WasteMetricsReporter) MarkFailedSchedulingAttempt ¶
func (r *WasteMetricsReporter) MarkFailedSchedulingAttempt(pod *v1.Pod, outcome string)
MarkFailedSchedulingAttempt should be called to indicate that scheduling for the passed pod failed with that outcome.
func (*WasteMetricsReporter) StartSchedulingOverheadMetrics ¶
func (r *WasteMetricsReporter) StartSchedulingOverheadMetrics( podInformer coreinformers.PodInformer, demandInformer *crd.LazyDemandInformer, )
StartSchedulingOverheadMetrics will start tracking demand creation and fulfillment times and report scheduling wasted time per pod