public boolean inControlledShutdown(int brokerId) {
        BrokerRegistration registration = brokerRegistrations.get(brokerId);
        if (registration == null) return false;
        return registration.inControlledShutdown();
    }
Returns true if the broker is in controlled shutdown state; Returns false
if it is not or if it does not exist.
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java