Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EvictionReason_name = map[EvictionReason_Type]string{ EvictionReason_INVALID: "EvictionReason_INVALID", EvictionReason_PREEMPTION: "EvictionReason_PREEMPTION", EvictionReason_HOST_MAINTENANCE: "EvictionReason_HOST_MAINTENANCE", }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // EvictionPeriod is the period to check for tasks for eviction EvictionPeriod time.Duration `yaml:"eviction_period"` // EvictionDequeueLimit is the limit for the number of tasks evictor // dequeues from resource manager and host manager EvictionDequeueLimit int `yaml:"eviction_dequeue_limit"` // EvictionDequeueTimeout is the timeout value for // dequeuing tasks from resource manager and host manager EvictionDequeueTimeout int `yaml:"eviction_dequeue_timeout_ms"` }
Config is Task evictor specific config
type EvictionReason_Type ¶
type EvictionReason_Type int
const ( // Invalid task eviction reason. EvictionReason_INVALID EvictionReason_Type = 0 // Task is being evicted due to preemption EvictionReason_PREEMPTION EvictionReason_Type = 1 // Task is being evicted due to host maintenance EvictionReason_HOST_MAINTENANCE EvictionReason_Type = 2 )
func (EvictionReason_Type) String ¶
func (er EvictionReason_Type) String() string
String returns the string value of eviction reason type
type Evictor ¶
type Evictor interface { // Start starts the task Evictor goroutines Start() error // Stop stops the task Evictor goroutines Stop() error }
Evictor defines the interface of task evictor which kills tasks from the preemption queue of resource manager and maintenance queue of host manager
type Metrics ¶
type Metrics struct { TaskEvictPreemptionSuccess tally.Counter TaskEvictPreemptionFail tally.Counter TaskEvictHostMaintenanceSuccess tally.Counter TaskEvictHostMaintenanceFail tally.Counter GetPreemptibleTasksCallDuration tally.Timer GetTasksOnDrainingHostsCallDuration tally.Timer }
Metrics is the struct containing all the counters that track internal state of task evictor.
func NewMetrics ¶
NewMetrics returns a new Metrics struct, with all metrics initialized and rooted at the given tally.Scope
Click to show internal directories.
Click to hide internal directories.