Documentation ¶
Overview ¶
Package mpather provides per-mountpath concepts.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package mpather provides per-mountpath concepts.
- Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
Index ¶
Constants ¶
View Source
const ( ThrottleMinDur = time.Millisecond ThrottleAvgDur = time.Millisecond * 10 ThrottleMaxDur = time.Millisecond * 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JoggerGroup ¶
type JoggerGroup struct {
// contains filtered or unexported fields
}
JoggerGroup runs jogger per mountpath which walk the entire bucket and call callback on each of the encountered object. When jogger encounters error it stops and informs other joggers about the error (so they stop too).
func NewJoggerGroup ¶
func NewJoggerGroup(opts *JoggerGroupOpts, selectedMpaths ...string) *JoggerGroup
func (*JoggerGroup) ListenFinished ¶
func (jg *JoggerGroup) ListenFinished() <-chan struct{}
func (*JoggerGroup) Num ¶
func (jg *JoggerGroup) Num() int
func (*JoggerGroup) Run ¶
func (jg *JoggerGroup) Run()
func (*JoggerGroup) Stop ¶
func (jg *JoggerGroup) Stop() error
type JoggerGroupOpts ¶
type JoggerGroupOpts struct { T cluster.Target VisitObj func(lom *cluster.LOM, buf []byte) error VisitCT func(ct *cluster.CT, buf []byte) error Slab *memsys.Slab Bck cmn.Bck CTs []string DoLoad LoadType // if specified, lom.Load(lock type) Parallel int // num parallel calls IncludeCopy bool // visit copies (aka replicas) SkipGloballyMisplaced bool // skip globally misplaced Throttle bool // true: pace itself depending on disk utilization // contains filtered or unexported fields }
type WorkerGroup ¶
type WorkerGroup struct {
// contains filtered or unexported fields
}
WorkerGroup starts one worker per mountpath; each worker receives (*cluster.LOM) tasks and executes the specified callback.
func NewWorkerGroup ¶
func NewWorkerGroup(opts *WorkerGroupOpts) *WorkerGroup
func (*WorkerGroup) Run ¶
func (wg *WorkerGroup) Run()
func (*WorkerGroup) Stop ¶
func (wg *WorkerGroup) Stop() (n int)
Stop aborts all the workers. It should be called after we are sure no more new tasks will be dispatched.
Click to show internal directories.
Click to hide internal directories.