You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/08/20 14:58:57 UTC

[GitHub] [druid] jp707049 opened a new issue #11621: Get Druid Service details in a DruidNode (via extension)

jp707049 opened a new issue #11621:
URL: https://github.com/apache/druid/issues/11621


   Hi all,
   
   Is there a way to to know what druid services are running in a `DruidNode` (Not talking about the HTTP APIs)?
   I went through `druid-server` module, class `DruidNodeDiscoveryProvider.getForNodeRole` which accepts a `NodeRole` and returns a `DruidNodeDiscovery` instance after which we can use `getAllNodes()` method which returns `Collection<DiscoveryDruidNode>`. And for each item in the `Collection<DiscoveryDruidNode>` we can use `getServiceName()` method to get the service name.
   
   The question is, how can we get the instance of `NodeRole` running in the druid process. For example, if we have a host running broker service, is there a way to get `NodeRole` for broker process dynamically?
   
   For now I'm doing something like this. Adding all NodeRole in every host, since our extension runs in every host.:
   
   ```java
   List<DruidNodeDiscovery> druidNodeDiscoveryList = ImmutableList.of(
           druidNodeDiscoveryProvider.getForNodeRole(NodeRole.COORDINATOR),
           druidNodeDiscoveryProvider.getForNodeRole(NodeRole.OVERLORD),
           druidNodeDiscoveryProvider.getForNodeRole(NodeRole.HISTORICAL),
           druidNodeDiscoveryProvider.getForNodeRole(NodeRole.MIDDLE_MANAGER),
           druidNodeDiscoveryProvider.getForNodeRole(NodeRole.INDEXER),
           druidNodeDiscoveryProvider.getForNodeRole(NodeRole.BROKER),
           druidNodeDiscoveryProvider.getForNodeRole(NodeRole.ROUTER)
       ); 
   ```
   
   I'm trying to build an extension. So this extension will run in every hosts in our druid cluster. After getting the service details we wanted to some further procession from our side.
   
   Will really appreciate some pointers on this.
   
   Thank you :) 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] jp707049 closed issue #11621: Get Druid Service details in runtime (via extension)

Posted by GitBox <gi...@apache.org>.
jp707049 closed issue #11621:
URL: https://github.com/apache/druid/issues/11621


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] jp707049 commented on issue #11621: Get Druid Service details in runtime (via extension)

Posted by GitBox <gi...@apache.org>.
jp707049 commented on issue #11621:
URL: https://github.com/apache/druid/issues/11621#issuecomment-905158399


   Issue was resolved. Detailed discussion is at [dev list](https://lists.apache.org/thread.html/rdb243fb046d9076895a50544e7a75dd8e99c19419e82f9314f8392f6%40%3Cdev.druid.apache.org%3E)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org