Ah, thank you, SIGTERM is what I was looking for. The docs are unclear on that, it would be useful to fix those. Thanks!
> On Jul 27, 2015, at 14:59, Binh Nguyen Van <binhn...@gmail.com> wrote: > > You can initiate controlled shutdown by run bin/kafka-server-stop.sh. This > will send a SIGTERM to broker to tell it to do the controlled shutdown. > I also got confused before and had to look at the code to figure that out. > I think it is better if we can add this to the document. > > -Binh > > On Mon, Jul 27, 2015 at 11:50 AM, Andrew Otto <ao...@wikimedia.org> wrote: > >> Thanks! >> >> But how do I initiate a controlled shutdown on a running broker? Editing >> server.properties is not going to cause this to happen. Don’t I have to >> tell the broker to shutdown nicely? All I really want to do is tell the >> controller to move leadership to other replicas, so I can shutdown the >> broker without clients getting all confused. >> >> >>> On Jul 27, 2015, at 14:48, Sriharsha Chintalapani <ka...@harsha.io> >> wrote: >>> >>> You can set controlled.shutdown.enable to true in kafka’s >> server.properties , this is enabled by default in 0.8.2 on wards >>> and also you can set max retries using controlled.shutdown.max.retries >> defaults to 3 . >>> >>> >>> Thanks, >>> Harsha >>> >>> >>> On July 27, 2015 at 11:42:32 AM, Andrew Otto (ao...@wikimedia.org >> <mailto:ao...@wikimedia.org>) wrote: >>> >>>> I’m working on packaging 0.8.2.1 for Wikimedia, and in doing so I’ve >> noticed that kafka.admin.ShutdownBroker doesn’t exist anymore. From what I >> can tell, this has been intentionally removed in favor of a JMX(?) config >> “controlled.shutdown.enable”. It is unclear from the documentation how one >> is supposed to set this for a running broker. Do I need a special JMX tool >> in order to flick this switch? I’d like to add a command to my kafka bin >> wrapper script so that I can easily use this when restarting brokers. >>>> >>>> What is the proper way to set controlled.shutdown.enable? >>>> >>>> Thanks! >>>> -Andrew Otto >>>> >>>> >> >>