partitioner

package
v3.35.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package partitioner provides the Partitioner type, which provides helper methods for determining partitions based on string keys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Partitioner

type Partitioner struct{}

Partitioner encapsulates helper methods for determining partitions

func NewPartitioner

func NewPartitioner() *Partitioner

NewPartitioner returns a new instance of Partitioner with default values.

func (*Partitioner) PartitionsForKeys

func (p *Partitioner) PartitionsForKeys(tkey dax.TableKey, partitionN int, keys ...string) map[dax.PartitionNum][]string

PartitionsForKeys returns a map of partitions to the list of strings which fall into that partition.

func (*Partitioner) ShardToPartition

func (p *Partitioner) ShardToPartition(tkey dax.TableKey, shard dax.ShardNum, partitionN int) dax.PartitionNum

ShardToPartition returns the PartitionNum for the given shard.

Jump to

Keyboard shortcuts

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