Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for NewWaitingPodsMap (0.27 sec)

  1. pkg/scheduler/framework/runtime/waiting_pods_map.go

    )
    
    // waitingPodsMap a thread-safe map used to maintain pods waiting in the permit phase.
    type waitingPodsMap struct {
    	pods map[types.UID]*waitingPod
    	mu   sync.RWMutex
    }
    
    // NewWaitingPodsMap returns a new waitingPodsMap.
    func NewWaitingPodsMap() *waitingPodsMap {
    	return &waitingPodsMap{
    		pods: make(map[types.UID]*waitingPod),
    	}
    }
    
    // add a new WaitingPod to the map.
    func (m *waitingPodsMap) add(wp *waitingPod) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. pkg/scheduler/scheduler.go

    	metricsRecorder := metrics.NewMetricsAsyncRecorder(1000, time.Second, stopEverything)
    	// waitingPods holds all the pods that are in the scheduler and waiting in the permit stage
    	waitingPods := frameworkruntime.NewWaitingPodsMap()
    
    	profiles, err := profile.NewMap(ctx, options.profiles, registry, recorderFactory,
    		frameworkruntime.WithComponentConfigVersion(options.componentConfigVersion),
    		frameworkruntime.WithClientSet(client),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:20:55 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/runtime/framework_test.go

    			ctx, cancel := context.WithCancel(context.Background())
    			defer cancel()
    			f, err := newFrameworkWithQueueSortAndBind(ctx, registry, profile,
    				WithWaitingPods(NewWaitingPodsMap()),
    			)
    			if err != nil {
    				t.Fatalf("fail to create framework: %s", err)
    			}
    
    			status := f.RunPermitPlugins(ctx, nil, pod, "")
    			if !reflect.DeepEqual(status, tt.want) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 103K bytes
    - Viewed (0)
  4. pkg/scheduler/scheduler_test.go

    		tf.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
    	}
    	eventBroadcaster := events.NewBroadcaster(&events.EventSinkImpl{Interface: client.EventsV1()})
    	waitingPods := frameworkruntime.NewWaitingPodsMap()
    	fwk, err := tf.NewFramework(ctx,
    		registerPluginFuncs,
    		testSchedulerName,
    		frameworkruntime.WithClientSet(client),
    		frameworkruntime.WithInformerFactory(informerFactory),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 42K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/defaultpreemption/default_preemption_test.go

    				frameworkruntime.WithSnapshotSharedLister(internalcache.NewSnapshot(tt.pods, tt.nodes)),
    				frameworkruntime.WithLogger(logger),
    				frameworkruntime.WithWaitingPods(frameworkruntime.NewWaitingPodsMap()),
    			)
    			if err != nil {
    				t.Fatal(err)
    			}
    			p := DefaultPreemption{
    				fh:        f,
    				podLister: informerFactory.Core().V1().Pods().Lister(),
    				pdbLister: getPDBLister(informerFactory),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 15:52:16 UTC 2024
    - 82.8K bytes
    - Viewed (0)
  6. pkg/scheduler/schedule_one_test.go

    				testSchedulerName,
    				frameworkruntime.WithClientSet(client),
    				frameworkruntime.WithEventRecorder(eventBroadcaster.NewRecorder(scheme.Scheme, testSchedulerName)),
    				frameworkruntime.WithWaitingPods(frameworkruntime.NewWaitingPodsMap()),
    			)
    			if err != nil {
    				t.Fatal(err)
    			}
    
    			sched := &Scheduler{
    				Cache:  cache,
    				client: client,
    				NextPod: func(logger klog.Logger) (*framework.QueuedPodInfo, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:20:55 UTC 2024
    - 128.1K bytes
    - Viewed (0)
Back to top