MCPcopy
hub / github.com/NVIDIA/aistore / GetRandTarget

Method GetRandTarget

cluster/map.go:389–396  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

387}
388
389func (m *Smap) GetRandTarget() (tsi *Snode, err error) {
390 for _, tsi = range m.Tmap {
391 if !tsi.IsAnySet(NodeFlagsMaintDecomm) {
392 return
393 }
394 }
395 return nil, cmn.NewErrNoNodes(apc.Target)
396}
397
398func (m *Smap) GetRandProxy(excludePrimary bool) (si *Snode, err error) {
399 var cnt int

Callers 15

getRandTargetConfigFunction · 0.80
BenchmarkECRebalanceFunction · 0.80
BenchmarkRebalanceFunction · 0.80
listObjectsMethod · 0.80
listBucketsMethod · 0.80
headRemoteBckMethod · 0.80
getRemoteAISInfoMethod · 0.80
TestGetNodeStatsFunction · 0.80
TestConfigGetFunction · 0.80
TestDownloadMountpathFunction · 0.80
doMethod · 0.80
killRestoreDiffIPFunction · 0.80

Calls 2

NewErrNoNodesFunction · 0.92
IsAnySetMethod · 0.45

Tested by 15

BenchmarkECRebalanceFunction · 0.64
BenchmarkRebalanceFunction · 0.64
TestGetNodeStatsFunction · 0.64
TestConfigGetFunction · 0.64
TestDownloadMountpathFunction · 0.64
doMethod · 0.64
killRestoreDiffIPFunction · 0.64
primaryAndTargetCrashFunction · 0.64
_addNodeDuplicateIPFunction · 0.64
targetRejoinFunction · 0.64