You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/03/04 16:36:33 UTC

[GitHub] [kafka] C0urante commented on pull request #9826: KAFKA-10816: Initialize REST endpoints only after the herder has started

C0urante commented on pull request #9826:
URL: https://github.com/apache/kafka/pull/9826#issuecomment-790751172


   Thanks for taking this on, Tom!
   
   This seems fairly involved and I'm wondering if there's a simpler solution. The changes here cause `DistributedHerder::start` to block on the completion of `DistributedHerder::startServices`, which is invoked on a separate thread. If we want to retain this blocking behavior, could we move the invocation of `DistributedHerder::startServices` into the `DistributedHerder::start` method? I'm thinking something like this:
   
   ```java
   public class DistributedHerder extends AbstractHerder {
     @Override
     public void start() {
       log.info("Herder starting");
       startServices();
       log.info("Herder started");
   
       this.herderExecutor.submit(this);
     }
   }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org