metastore

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: AGPL-3.0 Imports: 59 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompactionConfig

type CompactionConfig struct {
	JobLeaseDuration time.Duration `yaml:"job_lease_duration"`
	JobMaxFailures   int           `yaml:"job_max_failures"`
}

func (*CompactionConfig) RegisterFlagsWithPrefix

func (cfg *CompactionConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

type Config

type Config struct {
	Address           string              `yaml:"address"`
	GRPCClientConfig  grpcclient.Config   `yaml:"grpc_client_config" doc:"description=Configures the gRPC client used to communicate with the metastore."`
	DataDir           string              `yaml:"data_dir"`
	Raft              RaftConfig          `yaml:"raft"`
	Compaction        CompactionConfig    `yaml:"compaction_config"`
	MinReadyDuration  time.Duration       `yaml:"min_ready_duration" category:"advanced"`
	DLQRecoveryPeriod time.Duration       `yaml:"dlq_recovery_period" category:"advanced"`
	Index             index.Config        `yaml:"index_config"`
	BlockCleaner      blockcleaner.Config `yaml:"block_cleaner_config"`
}

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

func (*Config) Validate

func (cfg *Config) Validate() error

type FSM

type FSM struct {
	// contains filtered or unexported fields
}

func (*FSM) Apply

func (fsm *FSM) Apply(l *raft.Log) interface{}

func (*FSM) Restore

func (fsm *FSM) Restore(snapshot io.ReadCloser) error

func (*FSM) Snapshot

func (fsm *FSM) Snapshot() (raft.FSMSnapshot, error)

type Metastore

type Metastore struct {
	metastorev1.MetastoreServiceServer
	metastorev1.OperatorServiceServer
	compactorv1.CompactionPlannerServer
	// contains filtered or unexported fields
}

func New

func New(
	config Config,
	logger log.Logger,
	reg prometheus.Registerer,
	healthService health.Service,
	client metastorev1.MetastoreServiceClient,
	bucket objstore.Bucket,
	placementMgr *adaptiveplacement.Manager,
) (*Metastore, error)

func (*Metastore) AddBlock

func (*Metastore) AddRecoveredBlock added in v1.9.0

func (*Metastore) CheckReady

func (m *Metastore) CheckReady(ctx context.Context) error

CheckReady verifies if the metastore is ready to serve requests by ensuring the node is up-to-date with the leader's commit index.

func (*Metastore) QueryMetadata

func (*Metastore) ReadIndex

ReadIndex returns the current commit index and verifies leadership.

func (*Metastore) Service

func (m *Metastore) Service() services.Service

func (*Metastore) Shutdown

func (m *Metastore) Shutdown() error

func (*Metastore) TransferLeadership added in v1.10.0

func (m *Metastore) TransferLeadership() (err error)

type RaftConfig

type RaftConfig struct {
	Dir string `yaml:"dir"`

	BootstrapPeers       []string `yaml:"bootstrap_peers"`
	BootstrapExpectPeers int      `yaml:"bootstrap_expect_peers"`

	ServerID         string `yaml:"server_id"`
	BindAddress      string `yaml:"bind_address"`
	AdvertiseAddress string `yaml:"advertise_address"`

	ApplyTimeout time.Duration `yaml:"apply_timeout" doc:"hidden"`
}

func (*RaftConfig) RegisterFlagsWithPrefix

func (cfg *RaftConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

func (*RaftConfig) Validate

func (cfg *RaftConfig) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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