partition_manager

package
v0.0.0-...-e603270 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocPartPolicy

type AllocPartPolicy interface {
	AllocPart(nodes map[uint64]*pspb.PSDetail) (PSID uint64, err error)
}

type PartitionManager

type PartitionManager struct {
	ID uint64 //backend ETCD server's ID

	utils.SafeMutex
	// contains filtered or unexported fields
}

FIXME: 考虑重新分配range partitin的情况, 可能把程序变成单线程server, 避免过多的lock

func NewPartitionManager

func NewPartitionManager(etcd *embed.Etcd, client *clientv3.Client, config *manager.Config) *PartitionManager

func (*PartitionManager) AmLeader

func (pm *PartitionManager) AmLeader() bool

func (*PartitionManager) Close

func (pm *PartitionManager) Close()

FIXME

func (*PartitionManager) LeaderLoop

func (pm *PartitionManager) LeaderLoop()

FIXME:put into etcd_op

type SimplePolicy

type SimplePolicy struct{}

func (SimplePolicy) AllocPart

func (SimplePolicy) AllocPart(nodes map[uint64]*pspb.PSDetail) (PSID uint64, err error)

FIXME: should clone

Jump to

Keyboard shortcuts

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