Skip to content

Commit

Permalink
The first two tasks under Partition Management in the Kafka book
Browse files Browse the repository at this point in the history
  • Loading branch information
solsson committed Nov 10, 2017
1 parent d1377a5 commit 59fb4b9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions maintenance/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

## Trigger leadership election

This is one of the cases where this repo begs to differ from traditional Kafka setups.
In Kubernetes the restart of a pod, and subsequent start on a different node, should be a non-event.

> ”when a broker is stopped and restarted, it does not resume leadership of any partitions automatically”
_-- Neha Narkhede, Gwen Shapira, and Todd Palino. ”Kafka: The Definitive Guide”_

Create the `preferred-replica-election-job.yml` resource, after deleting any previous one.

## Changing a Partition's Replicas

> ”From time to time, it may be necessary to change the replica assignments for a partition. Some examples of when this might be needed are:
> * If a topic’s partitions are not balanced across the cluster, causing uneven load on brokers
> * If a broker is taken offline and the partition is under-replicated
> * If a new broker is added and needs to receive a share of the cluster load”
_-- Neha Narkhede, Gwen Shapira, and Todd Palino. ”Kafka: The Definitive Guide”_

Use the `reassign-paritions-job.yml`, after editing `TOPICS` and `BROKERS`.

0 comments on commit 59fb4b9

Please sign in to comment.