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

Function Stop

etl/transform.go:364–391  ·  view source on GitHub ↗

Stop deletes all occupied by the ETL resources, including Pods and Services. It unregisters ETL smap listener.

(t cluster.Target, id string, errCause error)

Source from the content-addressed store, hash-verified

362// Stop deletes all occupied by the ETL resources, including Pods and Services.
363// It unregisters ETL smap listener.
364func Stop(t cluster.Target, id string, errCause error) error {
365 errCtx := &cmn.ETLErrorContext{
366 TID: t.SID(),
367 UUID: id,
368 }
369
370 // Abort any running offline ETLs.
371 xreg.AbortAll(errCause, apc.ActETLBck)
372
373 c, err := GetCommunicator(id, t.Snode())
374 if err != nil {
375 return cmn.NewErrETL(errCtx, err.Error())
376 }
377 errCtx.PodName = c.PodName()
378 errCtx.SvcName = c.SvcName()
379
380 if err := cleanupEntities(errCtx, c.PodName(), c.SvcName()); err != nil {
381 return err
382 }
383
384 if c := reg.removeByUUID(id); c != nil {
385 t.Sowner().Listeners().Unreg(c)
386 }
387
388 c.Stop()
389
390 return nil
391}
392
393// StopAll terminates all running ETLs.
394func StopAll(t cluster.Target) {

Callers 4

_etlMDChangeMethod · 0.92
stopETLMethod · 0.92
ListenSmapChangedMethod · 0.70
StopAllFunction · 0.70

Calls 14

AbortAllFunction · 0.92
NewErrETLFunction · 0.92
GetCommunicatorFunction · 0.85
cleanupEntitiesFunction · 0.85
removeByUUIDMethod · 0.80
SIDMethod · 0.65
SnodeMethod · 0.65
PodNameMethod · 0.65
SvcNameMethod · 0.65
UnregMethod · 0.65
ListenersMethod · 0.65
SownerMethod · 0.65

Tested by

no test coverage detected