shuffle

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 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 Shuffle

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

Shuffle shuffles messages among ISB

func NewShuffle

func NewShuffle(vertexName string, partitionCount int) *Shuffle

NewShuffle accepts list of buffer identifiers(unique identifier of isb) and returns new shuffle instance. It uses vertex-name as seed, without a seed, we will end with the problem where Shuffling before the Vnth vertex creates a key to edge-buffer-index affinity, which will not change from Vn to Vn+1 Reduce vertices if there is no re-keying between these vertices causing idle partitions.

func (*Shuffle) Shuffle added in v0.6.2

func (s *Shuffle) Shuffle(keys []string) int32

Shuffle functions returns a shuffled identifier.

func (*Shuffle) ShuffleMessages

func (s *Shuffle) ShuffleMessages(messages []*isb.Message) map[int32][]*isb.Message

ShuffleMessages accepts list of isb messages and returns the mapping of isb to messages

Jump to

Keyboard shortcuts

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