Documentation ¶
Index ¶
- 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, driverNodeName string, executorNodeNames []string, ...)
- func ReportPackingEfficiency(ctx context.Context, packingFunctionName string, ...)
- 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 ResourceUsageReporter
- type ScheduleTimer
- type SoftReservationCompactionTimer
- type SoftReservationMetrics
- type SparkPodConditions
- type WasteMetricsReporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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, driverNodeName string, executorNodeNames []string, nodes []*v1.Node)
ReportCrossZoneMetric reports metric about cross AZ traffic between pods of a spark application
func ReportPackingEfficiency ¶ added in v0.47.0
func ReportPackingEfficiency( ctx context.Context, packingFunctionName string, efficiency binpack.AvgPackingEfficiency)
ReportPackingEfficiency report packing efficiency metrics for a single packing result.
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 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