Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "stage", Short: "Execute a series of partition reassignments", Long: long, RunE: func(cmd *cobra.Command, args []string) error { rs, err := readReassignments(reassignmentsFilepath) if err != nil { return fmt.Errorf("problem reading reassignments json file: %w", err) } if rs.Version != 1 { return fmt.Errorf("unsupported version '%d'", rs.Version) } client := &kafka.Client{Addr: kafka.TCP(vars.BootstrapServer)} err = ReconcileUntilDone(client, rs, maxMovesPerBroker, dryRun) if err != nil { return err } fmt.Println("Reassignments complete.") return nil }, }
Functions ¶
func ReconcileUntilDone ¶
func ReconcileUntilDone(client *kafka.Client, rs *Reassignments, maxMovesPerBroker int, dryRun bool) error
Types ¶
type Reassignment ¶
type Reassignment struct { Topic string `json:"topic"` Partition int `json:"partition"` Replicas []int `json:"replicas"` LogDirs []string `json:"log_dirs,omitempty"` // contains filtered or unexported fields }
func (Reassignment) String ¶
func (r Reassignment) String() string
type Reassignments ¶
type Reassignments struct { Partitions []Reassignment `json:"partitions"` Version int `json:"version"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.