config

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterConfig

type ClusterConfig struct {
	PreAllocatedGroupNum uint64 `toml:"pre-allocated-group-num"` //the number of shards allocated in initiation
	MaxGroupNum          uint64 `toml:"max-group-num"`           //the max number of shards
}

type Config

type Config struct {
	CubeConfig    cConfig.Config //config of cubeDriver
	ClusterConfig ClusterConfig  //config of the cluster
	// FeaturesConfig config of all storages feature
	FeaturesConfig CubeFeatureConfig
}

type CubeFeatureConfig

type CubeFeatureConfig struct {
	// KV kv storage cube feature
	KV FeatureConfig `toml:"kv-feature"`
	// AOE aoe storage cube feature
	AOE FeatureConfig `toml:"aoe-feature"`
}

CubeFeatureConfig MO will have multiple internal storage engines, each storage engine manages a group of shards, each group of shard splitting, log compaction and other features need to be independent. Here the configuration of all storage engine features managed by MO is configured.

type FeatureConfig

type FeatureConfig struct {
	// ShardSplitCheckDuration duration to check if the Shard needs to be split.
	ShardSplitCheckDuration typeutil.Duration `toml:"shard-split-check-duration"`
	// ShardCapacity the size of the data managed by each Shard, beyond which the Shard needs
	// to be split.
	ShardCapacityBytes typeutil.ByteSize `toml:"shard-capacity-bytes"`
	// ShardSplitCheckBytes the Cube records a shard-managed data size in memory, which is an approximate
	// value that changes after each Write call. Whenever this value exceeds the size set by the
	// current field, a real check is made to see if a split is needed, involving real IO operations.
	ShardSplitCheckBytes typeutil.ByteSize `toml:"shard-split-check-bytes"`
	// DisableShardSplit disable shard split
	DisableShardSplit bool `toml:"disable-shard-split"`
	// ForceCompactCount force compaction when the number of Raft logs reaches the specified number
	ForceCompactCount uint64 `toml:"force-compact-count"`
	// ForceCompactBytes force compaction when the number of Raft logs reaches the specified bytes
	ForceCompactBytes typeutil.ByteSize `toml:"force-compact-bytes"`
}

FeatureConfig individual storage engine feature configuration

func (*FeatureConfig) Feature

func (f *FeatureConfig) Feature() storage.Feature

Feature convert to storage.Feature

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL