Documentation ¶
Overview ¶
Package meta: cluster-level metadata
- Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
Package meta: cluster-level metadata
- Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
Package meta: cluster-level metadata
- Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
Package meta: cluster-level metadata
- Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
Package meta: cluster-level metadata
- Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
Index ¶
- Constants
- func FreeNodes(nodes Nodes)
- func MaxBcastParallel() int
- func N2ID(name string) string
- func Pname(pid string) string
- func Tname(tid string) string
- type BMD
- func (m *BMD) Add(bck *Bck)
- func (m *BMD) Del(bck *Bck) (deleted bool)
- func (m *BMD) Exists(bck *Bck, bckID uint64) (exists bool)
- func (m *BMD) Get(bck *Bck) (p *cmn.BucketProps, present bool)
- func (m *BMD) IsECUsed() (yes bool)
- func (m *BMD) IsEmpty() bool
- func (*BMD) JspOpts() jsp.Options
- func (m *BMD) Range(providerQuery *string, nsQuery *cmn.Ns, callback func(*Bck) bool)
- func (m *BMD) Select(qbck *cmn.QueryBcks) cmn.Bcks
- func (m *BMD) Set(bck *Bck, p *cmn.BucketProps)
- func (m *BMD) String() string
- func (m *BMD) StringEx() string
- type Bck
- func (b *Bck) AddToQuery(q url.Values) url.Values
- func (b *Bck) AddUnameToQuery(q url.Values, uparam string) url.Values
- func (b *Bck) Allow(bit apc.AccessAttrs) error
- func (b *Bck) Backend() *Bck
- func (b *Bck) Bucket() *cmn.Bck
- func (b *Bck) CksumConf() (conf *cmn.CksumConf)
- func (b *Bck) Clone() cmn.Bck
- func (b *Bck) Cname(name string) string
- func (b *Bck) Equal(other *Bck, sameID, sameBackend bool) bool
- func (b *Bck) HasProvider() bool
- func (b *Bck) Init(bowner Bowner) (err error)
- func (b *Bck) InitFast(bowner Bowner) (err error)
- func (b *Bck) InitNoBackend(bowner Bowner) error
- func (b *Bck) IsAIS() bool
- func (b *Bck) IsCloud() bool
- func (b *Bck) IsEmpty() bool
- func (b *Bck) IsHDFS() bool
- func (b *Bck) IsHTTP() bool
- func (b *Bck) IsQuery() bool
- func (b *Bck) IsRemote() bool
- func (b *Bck) IsRemoteAIS() bool
- func (b *Bck) MakeUname(name string) string
- func (b *Bck) MaskBID(i int64) uint64
- func (b *Bck) RemoteBck() *cmn.Bck
- func (b *Bck) String() string
- func (b *Bck) Validate() error
- func (b *Bck) VersionConf() cmn.VersionConf
- type Bowner
- type Buckets
- type Namespaces
- type NetInfo
- type NodeMap
- type Nodes
- type Providers
- type RMD
- type Slistener
- type Smap
- func (m *Smap) Compare(other *Smap) (uuid string, sameOrigin, sameVersion, eq bool)
- func (m *Smap) CompareTargets(other *Smap) (equal bool)
- func (m *Smap) Count() int
- func (m *Smap) CountActivePs() (count int)
- func (m *Smap) CountActiveTs() (count int)
- func (m *Smap) CountNonElectable() (count int)
- func (m *Smap) CountProxies() int
- func (m *Smap) CountTargets() int
- func (m *Smap) GetActiveNode(sid string) (si *Snode)
- func (m *Smap) GetNode(id string) *Snode
- func (m *Smap) GetProxy(pid string) *Snode
- func (m *Smap) GetRandProxy(excludePrimary bool) (si *Snode, err error)
- func (m *Smap) GetRandTarget() (tsi *Snode, err error)
- func (m *Smap) GetTarget(sid string) *Snode
- func (m *Smap) HasActiveTs(except string) bool
- func (m *Smap) ICCount() int
- func (m *Smap) InMaint(si *Snode) bool
- func (m *Smap) InMaintOrDecomm(si *Snode) bool
- func (m *Smap) InitDigests()
- func (m *Smap) IsDupNet(nsi *Snode) (osi *Snode, err error)
- func (m *Smap) IsIC(psi *Snode) (ok bool)
- func (m *Smap) IsPrimary(si *Snode) bool
- func (*Smap) JspOpts() jsp.Options
- func (m *Smap) NewTmap(tids []string) (tmap NodeMap, err error)
- func (m *Smap) NonElectable(psi *Snode) (ok bool)
- func (m *Smap) PubNet2Node(hostport string) *Snode
- func (m *Smap) StrIC(node *Snode) string
- func (m *Smap) String() string
- func (m *Smap) StringEx() string
- type SmapListeners
- type Snode
- func (d *Snode) Clone() *Snode
- func (d *Snode) Digest() uint64
- func (d *Snode) Equals(o *Snode) (eq bool)
- func (d *Snode) Fl2S() string
- func (d *Snode) ID() string
- func (d *Snode) InMaint() bool
- func (d *Snode) InMaintOrDecomm() bool
- func (d *Snode) InMaintPostReb() bool
- func (d *Snode) Init(id, daeType string)
- func (d *Snode) IsIC() bool
- func (d *Snode) IsProxy() bool
- func (d *Snode) IsTarget() bool
- func (d *Snode) Name() string
- func (d *Snode) SetName()
- func (d *Snode) String() string
- func (d *Snode) StringEx() string
- func (d *Snode) Type() string
- func (d *Snode) URL(network string) string
- func (d *Snode) Validate() error
- type Sowner
Constants ¶
const ( SnodeNonElectable cos.BitFlags = 1 << iota SnodeIC SnodeMaint SnodeDecomm SnodeMaintPostReb )
enum Snode.Flags
const ( PnamePrefix = "p[" TnamePrefix = "t[" SnameSuffix = "]" )
const DfltCountIC = 3
desirable gateway count in the Information Center (IC)
const SnodeMaintDecomm = SnodeMaint | SnodeDecomm
Variables ¶
This section is empty.
Functions ¶
func MaxBcastParallel ¶
func MaxBcastParallel() int
Types ¶
type BMD ¶
type BMD struct { Ext any `json:"ext,omitempty"` // within meta-version extensions Providers Providers `json:"providers"` // (provider, namespace, bucket) hierarchy UUID string `json:"uuid"` // unique & immutable Version int64 `json:"version,string"` // gets incremented on every update }
- BMD is the root of the (providers, namespaces, buckets) hierarchy - BMD (instance) can be obtained via Bowner.Get() - BMD is immutable and versioned - BMD versioning is monotonic and incremental
type Bck ¶
func InitByNameOnly ¶
to support s3 clients: find an already existing bucket by name (and nothing else) returns an error when name cannot be unambiguously resolved to a single bucket
func (*Bck) HasProvider ¶
func (*Bck) Init ¶
when the bucket is not present in the BMD: - always returns the corresponding *DoesNotExist error - Cloud bucket: fills in the props with defaults from config - AIS bucket: sets the props to nil - Remote (Cloud or Remote AIS) bucket: caller can type-cast err.(*cmn.ErrRemoteBckNotFound) and proceed
func (*Bck) InitNoBackend ¶
func (*Bck) IsRemoteAIS ¶
func (*Bck) VersionConf ¶
func (b *Bck) VersionConf() cmn.VersionConf
type Bowner ¶
type Bowner interface {
Get() (bmd *BMD)
}
interface to Get current (versioned, immutable) BMD instance (for implementation, see ais/bucketmeta.go)
type Buckets ¶
type Buckets map[string]*cmn.BucketProps
type Namespaces ¶
type NetInfo ¶
type NetInfo struct { Hostname string `json:"node_ip_addr"` Port string `json:"daemon_port"` URL string `json:"direct_url"` // contains filtered or unexported fields }
Snode's networking info
func NewNetInfo ¶
func (*NetInfo) TCPEndpoint ¶
type NodeMap ¶
func (NodeMap) ActiveNodes ¶
type Providers ¶
type Providers map[string]Namespaces
type RMD ¶
type RMD struct { Ext any `json:"ext,omitempty"` // within meta-version extensions Resilver string `json:"resilver,omitempty"` TargetIDs []string `json:"target_ids,omitempty"` Version int64 `json:"version"` }
RMD (Rebalance MetaData)
type Slistener ¶
type Slistener interface { String() string ListenSmapChanged() }
Smap On-change listeners (see ais/clustermap.go for impl-s)
type Smap ¶
type Smap struct { Ext any `json:"ext,omitempty"` Pmap NodeMap `json:"pmap"` // [pid => Snode] Primary *Snode `json:"proxy_si"` Tmap NodeMap `json:"tmap"` // [tid => Snode] UUID string `json:"uuid"` // assigned once at creation time and never change CreationTime string `json:"creation_time"` // creation timestamp Version int64 `json:"version,string"` }
cluster map
func (*Smap) CompareTargets ¶
func (*Smap) CountActivePs ¶
func (*Smap) CountActiveTs ¶
func (*Smap) CountNonElectable ¶
func (*Smap) CountProxies ¶
func (*Smap) CountTargets ¶
func (*Smap) GetActiveNode ¶
(convenient, slightly redundant)
func (*Smap) HasActiveTs ¶
whether this target has active peers
func (*Smap) InMaintOrDecomm ¶
given Snode, check (usually, the current) Smap that it is present _and_ InMaintOrDecomm (see also GetActiveNode)
func (*Smap) InitDigests ¶
func (m *Smap) InitDigests()
func (*Smap) NonElectable ¶
type SmapListeners ¶
type Snode ¶
type Snode struct { Ext any `json:"ext,omitempty"` // within meta-version extensions LocalNet *net.IPNet `json:"-"` PubNet NetInfo `json:"public_net"` // cmn.NetPublic DataNet NetInfo `json:"intra_data_net"` // cmn.NetIntraData ControlNet NetInfo `json:"intra_control_net"` // cmn.NetIntraControl DaeType string `json:"daemon_type"` // "target" or "proxy" DaeID string `json:"daemon_id"` Flags cos.BitFlags `json:"flags"` // enum { SnodeNonElectable, SnodeIC, ... } // contains filtered or unexported fields }
Snode - a node (gateway or target) in a cluster
func (*Snode) InMaintPostReb ¶
type Sowner ¶
type Sowner interface { Get() (smap *Smap) Listeners() SmapListeners }
interface to Get current (immutable, versioned) cluster map (Smap) instance