clintropolis commented on a change in pull request #10183:
URL: https://github.com/apache/druid/pull/10183#discussion_r457677752



##########
File path: 
server/src/main/java/org/apache/druid/discovery/DiscoveryDruidNode.java
##########
@@ -80,6 +84,16 @@ public DruidNode getDruidNode()
     return druidNode;
   }
 
+  public boolean isDiscoverableDataServer()
+  {
+    final DruidService druidService = 
services.get(DataNodeService.DISCOVERY_SERVICE_KEY);
+    if (druidService == null) {
+      return false;
+    }
+    final DataNodeService dataNodeService = (DataNodeService) druidService;
+    return dataNodeService.isDiscoverable();
+  }
+
   public DruidServer toDruidServer()
   {
     return new DruidServer(

Review comment:
       should this precondition check `isDiscoverableDataServer`?




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to