Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct { RevocableRunningTasksToPreempt tally.Counter RevocableNonRunningTasksToPreempt tally.Counter NonRevocableRunningTasksToPreempt tally.Counter NonRevocableNonRunningTasksToPreempt tally.Counter PreemptionQueueSize tally.Gauge TasksToEvict tally.Gauge TasksFailedPreemption tally.Counter NonSlackTotalResourcesToFree scalar.CounterMaps NonSlackNonRunningTasksResourcesFreed scalar.CounterMaps NonSlackRunningTasksResourcesToFreed scalar.CounterMaps SlackTotalResourcesToFree scalar.CounterMaps SlackNonRunningTasksResourcesFreed scalar.CounterMaps SlackRunningTasksResourcesToFreed scalar.CounterMaps OverAllocationCount tally.Gauge }
Metrics is a placeholder for all metrics in preemption
func NewMetrics ¶
NewMetrics returns a new instance of preemption.Metrics
type Preemptor ¶
type Preemptor struct {
// contains filtered or unexported fields
}
Preemptor preempts tasks based on either resource pool allocation or external sources eg host maintenance.
func NewPreemptor ¶
func NewPreemptor( parent tally.Scope, cfg *common.PreemptionConfig, tracker task.Tracker, resTree respool.Tree, ) *Preemptor
NewPreemptor creates a new preemptor and returns it
func (*Preemptor) DequeueTask ¶
DequeueTask dequeues a running task from the preemption queue
func (*Preemptor) EnqueueTasks ¶
EnqueueTasks enqueues tasks to be preempted
type Queue ¶
type Queue interface { // DequeueTask dequeues the RUNNING tasks from the preemption queue. // These tasks are then picked up by the jobmanager to be preempted. DequeueTask(maxWaitTime time.Duration) (*resmgr.PreemptionCandidate, error) // EnqueueTasks enqueues tasks either into the preemption queue for // RUNNING tasks or to the pending queue for NON_RUNNING tasks. // This API can be used by a caller when making a the decision to // preempt certain tasks outside of the preemptor. // This can include cases where a host is being taken down for maintenance. EnqueueTasks(tasks []*task.RMTask, event resmgr.PreemptionReason) error }
Queue exposes APIs to interact with the preemption queue.
Click to show internal directories.
Click to hide internal directories.