reassign

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "reassign",
	Short: "Execute a single partition reassignment",
	RunE: func(cmd *cobra.Command, args []string) error {
		client := &kafka.Client{Addr: kafka.TCP(vars.BootstrapServer)}

		brokerIDs, err := getBrokerIDs(replicas)
		if err != nil {
			return fmt.Errorf("problem parsing replica set: %w", err)
		}

		err = Partition(client, topic, partition, brokerIDs)
		if err != nil {
			return err
		}

		fmt.Println("Reassignment executed.")
		return nil
	},
}

Functions

func Partition

func Partition(client *kafka.Client, topic string, partition int, brokerIDs []int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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