From 10ec566f56f8b19c6ca44423dbda974f0b03604e Mon Sep 17 00:00:00 2001
From: Doug Szumski <doug@stackhpc.com>
Date: Tue, 19 Feb 2019 11:13:06 +0000
Subject: [PATCH] Make Kafka maintenance easier

This commit enables two settings which are useful when restarting a Kafka node
as part of a cluster. The first supports moving partitions for which a node
being restarting is the leader to another broker, and the second supports
automatically rebalancing partitions when the node rejoins the cluster. See
the documentation for more details:

https://kafka.apache.org/10/documentation.html#basic_ops_restarting

Change-Id: I0718fca08ea116db926b348e3e6e3bc2373db1fb
---
 ansible/roles/kafka/templates/kafka.server.properties.j2 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ansible/roles/kafka/templates/kafka.server.properties.j2 b/ansible/roles/kafka/templates/kafka.server.properties.j2
index 6e6058b70f..db3ada59c0 100644
--- a/ansible/roles/kafka/templates/kafka.server.properties.j2
+++ b/ansible/roles/kafka/templates/kafka.server.properties.j2
@@ -1,4 +1,6 @@
 listeners=PLAINTEXT://{{ api_interface_address }}:{{ kafka_port }}
+controlled.shutdown.enable=true
+auto.leader.rebalance.enable=true
 num.network.threads=3
 num.io.threads=8
 socket.send.buffer.bytes=102400