MINOR: Do not falsely log that partitions are being reassigned on controller startup
Previously we would log the following on each controller startup:
```
[2019-09-13 22:40:10,272] INFO [Controller id=2] DEPRECATED: Partitions being reassigned through ZooKeeper: Map()
```
This patch only logs the message if the map is non-empty.
Reviewers: Jason Gustafson
@@ -883,6 +883,7 @@ class KafkaController(val config: KafkaConfig,
*/
private def initializePartitionReassignment(): Unit = {
val partitionsBeingReassigned = zkClient.getPartitionReassignment
+ if (partitionsBeingReassigned.nonEmpty) {
info(s"DEPRECATED: Partitions being reassigned through ZooKeeper: $partitionsBeingReassigned")
partitionsBeingReassigned.foreach {
@@ -900,6 +901,7 @@ class KafkaController(val config: KafkaConfig,
ongoingReassignmentOpt = ongoingReassignmentOption))
}
}
+ }
private def fetchTopicDeletionsInProgress(): (Set[String], Set[String]) = {
val topicsToBeDeleted = zkClient.getTopicDeletions.toSet
