From b7dd0a7660c14efc85f56ebd39a8bcf98ef92d2b Mon Sep 17 00:00:00 2001 From: sanposhiho <44139130+sanposhiho@users.noreply.github.com> Date: Tue, 24 Aug 2021 17:22:10 +0900 Subject: [PATCH] Clean up: delete NumUnschedulablePods because it's no longer in use --- pkg/scheduler/internal/queue/scheduling_queue.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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()