Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for NodeTree (0.38 sec)

  1. pkg/scheduler/internal/cache/node_tree.go

    	"k8s.io/klog/v2"
    )
    
    // nodeTree is a tree-like data structure that holds node names in each zone. Zone names are
    // keys to "NodeTree.tree" and values of "NodeTree.tree" are arrays of node names.
    // NodeTree is NOT thread-safe, any concurrent updates/reads from it must be synchronized by the caller.
    // It is used only by schedulerCache, and should stay as such.
    type nodeTree struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 29 05:26:32 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  2. pkg/scheduler/internal/cache/cache.go

    	snapshot.havePodsWithRequiredAntiAffinityNodeInfoList = make([]*framework.NodeInfo, 0, cache.nodeTree.numNodes)
    	snapshot.usedPVCSet = sets.New[string]()
    	if updateAll {
    		// Take a snapshot of the nodes order in the tree
    		snapshot.nodeInfoList = make([]*framework.NodeInfo, 0, cache.nodeTree.numNodes)
    		nodesList, err := cache.nodeTree.list()
    		if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 24 09:56:48 UTC 2023
    - 24.9K bytes
    - Viewed (0)
  3. pkg/scheduler/internal/cache/node_tree_test.go

    			},
    		},
    	},
    }
    
    func verifyNodeTree(t *testing.T, nt *nodeTree, expectedTree map[string][]string) {
    	expectedNumNodes := int(0)
    	for _, na := range expectedTree {
    		expectedNumNodes += len(na)
    	}
    	if numNodes := nt.numNodes; numNodes != expectedNumNodes {
    		t.Errorf("unexpected nodeTree.numNodes. Expected: %v, Got: %v", expectedNumNodes, numNodes)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 05 08:00:25 UTC 2023
    - 13.1K bytes
    - Viewed (0)
  4. pkg/scheduler/internal/cache/cache_test.go

    			}
    			nodesList, err := cache.nodeTree.list()
    			if err != nil {
    				t.Fatal(err)
    			}
    			if cache.nodeTree.numNodes != len(tc.nodes) || len(nodesList) != len(tc.nodes) {
    				t.Errorf("cache.nodeTree is not updated correctly after adding node got: %d, expected: %d",
    					cache.nodeTree.numNodes, len(tc.nodes))
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 17 01:38:03 UTC 2023
    - 63.8K bytes
    - Viewed (0)
  5. pkg/scheduler/internal/cache/snapshot.go

    )
    
    // Snapshot is a snapshot of cache NodeInfo and NodeTree order. The scheduler takes a
    // snapshot at the beginning of each scheduling cycle and uses it for its operations in that cycle.
    type Snapshot struct {
    	// nodeInfoMap a map of node name to a snapshot of its NodeInfo.
    	nodeInfoMap map[string]*framework.NodeInfo
    	// nodeInfoList is the list of nodes as ordered in the cache's nodeTree.
    	nodeInfoList []*framework.NodeInfo
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 17 01:38:03 UTC 2023
    - 6.6K bytes
    - Viewed (0)
Back to top