Documentation
¶
Overview ¶
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
Index ¶
- Constants
- Variables
- func CompareRebIDs(someID, fltID string) int
- func GoRunW(xctn cluster.Xact)
- func IsBckScope(kind string) bool
- func IsMountpath(kind string) bool
- func IsValidKind(kind string) bool
- func IsValidRebID(id string) bool
- func RebID2S(id int64) string
- func RefcntQuiCB(refc *atomic.Int32, maxTimeout, totalSoFar time.Duration) cluster.QuiRes
- func S2RebID(id string) (int64, error)
- type Base
- func (xctn *Base) Abort(err error) (ok bool)
- func (xctn *Base) AbortErr() (err error)
- func (xctn *Base) AbortedAfter(d time.Duration) (err error)
- func (xctn *Base) AddNotif(n cluster.Notif)
- func (xctn *Base) Bck() *cluster.Bck
- func (xctn *Base) Bytes() int64
- func (xctn *Base) ChanAbort() <-chan error
- func (xctn *Base) EndTime() time.Time
- func (xctn *Base) Finish(err error)
- func (xctn *Base) Finished() bool
- func (*Base) FromTo() (*cluster.Bck, *cluster.Bck)
- func (xctn *Base) GetStats() (stats *Stats)
- func (xctn *Base) ID() string
- func (xctn *Base) InBytes() int64
- func (xctn *Base) InObjs() int64
- func (xctn *Base) InObjsAdd(cnt int, size int64)
- func (xctn *Base) InitBase(id, kind string, bck *cluster.Bck)
- func (xctn *Base) IsAborted() bool
- func (xctn *Base) Kind() string
- func (xctn *Base) Name() (s string)
- func (xctn *Base) Notif() (n cluster.Notif)
- func (xctn *Base) Objs() int64
- func (xctn *Base) ObjsAdd(cnt int, size int64)
- func (xctn *Base) OutBytes() int64
- func (xctn *Base) OutObjs() int64
- func (xctn *Base) OutObjsAdd(cnt int, size int64)
- func (xctn *Base) Quiesce(d time.Duration, cb cluster.QuiCB) cluster.QuiRes
- func (*Base) Result() (any, error)
- func (xctn *Base) Running() (yes bool)
- func (xctn *Base) Snap() cluster.XactSnap
- func (xctn *Base) StartTime() time.Time
- func (xctn *Base) String() string
- func (xctn *Base) ToSnap(snap *Snap)
- func (xctn *Base) ToStats(stats *Stats)
- type BaseDemandStatsExt
- type BckJog
- type Demand
- type DemandBase
- func (r *DemandBase) Abort(err error) (ok bool)
- func (r *DemandBase) DecPending()
- func (r *DemandBase) ExtSnap() *SnapExt
- func (r *DemandBase) IdleTimer() <-chan struct{}
- func (r *DemandBase) IncPending()
- func (r *DemandBase) Init(uuid, kind string, bck *cluster.Bck, idle time.Duration) (xdb *DemandBase)
- func (r *DemandBase) Pending() (cnt int64)
- func (r *DemandBase) Snap() cluster.XactSnap
- func (r *DemandBase) Stop()
- func (r *DemandBase) SubPending(n int)
- type Descriptor
- type Marked
- type NotifXact
- type NotifXactListener
- type QueryMsg
- type QueryMsgLRU
- type Snap
- type SnapExt
- type Stats
Constants ¶
const ( ScopeG = "global" ScopeT = "target" ScopeBck = "bucket" ScopeO = "other" )
Variables ¶
var IncFinished func()
var Table = map[string]Descriptor{ apc.ActLRU: {Scope: ScopeG, Startable: true, Mountpath: true}, apc.ActStoreCleanup: {Scope: ScopeG, Startable: true, Mountpath: true}, apc.ActElection: {Scope: ScopeG, Startable: false}, apc.ActResilver: {Scope: ScopeT, Startable: true, Mountpath: true, Resilver: true}, apc.ActRebalance: {Scope: ScopeG, Startable: true, Metasync: true, Owned: false, Mountpath: true, Rebalance: true}, apc.ActDownload: {Scope: ScopeG, Startable: false, Mountpath: true}, apc.ActETLInline: {Scope: ScopeG, Startable: false, Mountpath: false}, apc.ActECGet: {Scope: ScopeBck, Startable: false}, apc.ActECPut: {Scope: ScopeBck, Startable: false, Mountpath: true, RefreshCap: true}, apc.ActECRespond: {Scope: ScopeBck, Startable: false}, apc.ActMakeNCopies: {Scope: ScopeBck, Access: apc.AccessRW, Startable: true, Metasync: true, Owned: false, RefreshCap: true, Mountpath: true}, apc.ActPutCopies: {Scope: ScopeBck, Startable: false, Mountpath: true, RefreshCap: true}, apc.ActArchive: {Scope: ScopeBck, Startable: false, RefreshCap: true}, apc.ActCopyObjects: {Scope: ScopeBck, Startable: false, RefreshCap: true}, apc.ActETLObjects: {Scope: ScopeBck, Startable: false, RefreshCap: true}, apc.ActMoveBck: {Scope: ScopeBck, Access: apc.AceMoveBucket, Startable: false, Metasync: true, Owned: false, Mountpath: true, Rebalance: true, MassiveBck: true}, apc.ActCopyBck: {Scope: ScopeBck, Access: apc.AccessRW, Startable: false, Metasync: true, Owned: false, RefreshCap: true, Mountpath: true, MassiveBck: true}, apc.ActETLBck: {Scope: ScopeBck, Access: apc.AccessRW, Startable: false, Metasync: true, Owned: false, RefreshCap: true, Mountpath: true, MassiveBck: true}, apc.ActECEncode: {Scope: ScopeBck, Access: apc.AccessRW, Startable: true, Metasync: true, Owned: false, RefreshCap: true, Mountpath: true, MassiveBck: true}, apc.ActEvictObjects: {Scope: ScopeBck, Access: apc.AceObjDELETE, Startable: false, RefreshCap: true, Mountpath: true}, apc.ActDeleteObjects: {Scope: ScopeBck, Access: apc.AceObjDELETE, Startable: false, RefreshCap: true, Mountpath: true}, apc.ActLoadLomCache: {Scope: ScopeBck, Startable: true, Mountpath: true}, apc.ActPrefetchObjects: {Scope: ScopeBck, Access: apc.AccessRW, RefreshCap: true, Startable: true}, apc.ActPromote: {Scope: ScopeBck, Access: apc.AcePromote, Startable: false, RefreshCap: true}, apc.ActList: {Scope: ScopeBck, Access: apc.AceObjLIST, Startable: false, Metasync: false, Owned: true}, apc.ActInvalListCache: {Scope: ScopeBck, Access: apc.AceObjLIST, Startable: false}, apc.ActSummaryBck: {Scope: ScopeO, Access: apc.AceObjLIST | apc.AceBckHEAD, Startable: false, Metasync: false, Owned: true, Mountpath: true}, }
Table is a static Kind=>[Xaction Descriptor] map that contains static properties of a given xaction type (aka `kind`), such as: `Startable`, `Owned`, etc.
Functions ¶
func CompareRebIDs ¶
func IsBckScope ¶
func IsMountpath ¶
func IsValidKind ¶
func IsValidRebID ¶
func RefcntQuiCB ¶
common ref-counted quiescence
Types ¶
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
func (*Base) OutObjsAdd ¶
type BaseDemandStatsExt ¶
type BaseDemandStatsExt struct {
IsIdle bool `json:"is_idle"`
}
type BckJog ¶
type BckJog struct {
Base
// contains filtered or unexported fields
}
type Demand ¶
type Demand interface {
cluster.Xact
IdleTimer() <-chan struct{}
IncPending()
DecPending()
SubPending(n int)
}
xaction that self-terminates after staying idle for a while with an added capability to renew itself and ref-count its pending work
type DemandBase ¶
type DemandBase struct {
Base
// contains filtered or unexported fields
}
func (*DemandBase) Abort ¶
func (r *DemandBase) Abort(err error) (ok bool)
func (*DemandBase) DecPending ¶
func (r *DemandBase) DecPending()
func (*DemandBase) ExtSnap ¶
func (r *DemandBase) ExtSnap() *SnapExt
func (*DemandBase) IdleTimer ¶
func (r *DemandBase) IdleTimer() <-chan struct{}
func (*DemandBase) IncPending ¶
func (r *DemandBase) IncPending()
func (*DemandBase) Init ¶
func (r *DemandBase) Init(uuid, kind string, bck *cluster.Bck, idle time.Duration) (xdb *DemandBase)
func (*DemandBase) Pending ¶
func (r *DemandBase) Pending() (cnt int64)
func (*DemandBase) Snap ¶
func (r *DemandBase) Snap() cluster.XactSnap
func (*DemandBase) Stop ¶
func (r *DemandBase) Stop()
func (*DemandBase) SubPending ¶
func (r *DemandBase) SubPending(n int)
type Descriptor ¶
type Descriptor struct {
Scope string // ScopeG (global), etc. - the enum above
Access apc.AccessAttrs // Access required by xctn (see: apc.Access*)
Startable bool // determines if this xaction can be started via API
Metasync bool // true: changes and metasyncs cluster-wide meta
Owned bool // true: JTX-owned
RefreshCap bool // true: refresh capacity stats upon completion
Mountpath bool // true: mountpath-traversing (jogger-based) xaction
// see xreg for "limited coexistence"
Rebalance bool // moves data between nodes
Resilver bool // moves data between mountpaths
MassiveBck bool // massive data copying (transforming, encoding) operation on a bucket
}
type NotifXact ¶
func (*NotifXact) ToNotifMsg ¶
type NotifXactListener ¶
type NotifXactListener struct {
nl.NotifListenerBase
}
func (*NotifXactListener) AbortArgs ¶
func (nxb *NotifXactListener) AbortArgs() cmn.HreqArgs
(see also downloader.AbortArgs)
func (*NotifXactListener) QueryArgs ¶
func (nxb *NotifXactListener) QueryArgs() cmn.HreqArgs
func (*NotifXactListener) UnmarshalStats ¶
func (*NotifXactListener) UnmarshalStats(rawMsg []byte) (stats any, finished, aborted bool, err error)
type QueryMsg ¶
type QueryMsg struct {
OnlyRunning *bool `json:"show_active"`
Ext any `json:"ext"`
Bck cmn.Bck `json:"bck"`
ID string `json:"id"`
Kind string `json:"kind"`
DaemonID string `json:"node,omitempty"`
Buckets []cmn.Bck `json:"buckets,omitempty"`
}
NOTE: see closely related `api.XactReqArgs` and comments TODO: apc package, here and elsewhere
type QueryMsgLRU ¶
type QueryMsgLRU struct {
Force bool `json:"force"`
}
type Snap ¶
type Stats ¶
type Stats struct {
Objs int64 `json:"loc-objs,string"` // locally processed
Bytes int64 `json:"loc-bytes,string"` //
OutObjs int64 `json:"out-objs,string"` // transmit
OutBytes int64 `json:"out-bytes,string"` //
InObjs int64 `json:"in-objs,string"` // receive
InBytes int64 `json:"in-bytes,string"`
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package xreg provides registry and (renew, find) functions for AIS eXtended Actions (xactions).
|
Package xreg provides registry and (renew, find) functions for AIS eXtended Actions (xactions). |
|
Package xs contains most of the supported eXtended actions (xactions) with some exceptions that include certain storage services (mirror, EC) and extensions (downloader, lru).
|
Package xs contains most of the supported eXtended actions (xactions) with some exceptions that include certain storage services (mirror, EC) and extensions (downloader, lru). |