Yelp/kafka-utils

Rolling restart without Jolokia

ericfgarcia opened this issue · 3 comments

Is it possible to use the rolling restart functionality without Jolokia? We use the built in jmxremote functionality, is it possible to use that?

Thanks,
Eric Garcia

+1

kafka-utils uses the Value:0 of under replicated partition that gets generated by Jolokia. Based on if the Value:0 or not the next broker is restarted. So if you can get this value and use it in your logic you should be solid.
Now to get this value you can simply run
export ZK="--zookeeper zk01,zk02,zk03:2181/kafka"
/bin/kafka-topics.sh $ZK --describe --under-replicated-partitions >> output.log

Now do a regex on output.log to check the under-replicated-partitions value
if ( value == 0) : move to restart if not then wait.

Hope this helps.

It's a bit old issue, but for what it worth - I switched the metric reporter to be generic using abstract methods.
In my PR I've added Prometheus support, but the idea is to let users extend it to whatever metric reporters they are using as long as they implement the BaseRes abstract method:
https://github.com/EladLeev/kafka-utils/blob/prometheus_support/kafka_utils/kafka_rolling_restart/response.py