diff --git a/pkg/scheduler/internal/queue/scheduling_queue.go b/pkg/scheduler/internal/queue/scheduling_queue.go index 410e5451087..fc2e97b65de 100644 --- a/pkg/scheduler/internal/queue/scheduling_queue.go +++ b/pkg/scheduler/internal/queue/scheduling_queue.go @@ -29,7 +29,7 @@ import ( "sync" "time" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" @@ -101,8 +101,6 @@ type SchedulingQueue interface { // Close closes the SchedulingQueue so that the goroutine which is // waiting to pop items can exit gracefully. Close() - // NumUnschedulablePods returns the number of unschedulable pods exist in the SchedulingQueue. - NumUnschedulablePods() int // Run starts the goroutines managing the queue. Run() } @@ -721,13 +719,6 @@ func (p *PriorityQueue) podsCompareBackoffCompleted(podInfo1, podInfo2 interface return bo1.Before(bo2) } -// NumUnschedulablePods returns the number of unschedulable pods exist in the SchedulingQueue. -func (p *PriorityQueue) NumUnschedulablePods() int { - p.lock.RLock() - defer p.lock.RUnlock() - return len(p.unschedulableQ.podInfoMap) -} - // newQueuedPodInfo builds a QueuedPodInfo object. func (p *PriorityQueue) newQueuedPodInfo(pod *v1.Pod, plugins ...string) *framework.QueuedPodInfo { now := p.clock.Now()