leventov opened a new issue #8443: Standardized way to make intra-cluster (REST) queries URL: https://github.com/apache/incubator-druid/issues/8443 ### Problem While we don't have nice Java API binding, as, for example, gRPC provides, intra-cluster queries are done in various ad-hoc ways, for example, using manual String formatting: https://github.com/apache/incubator-druid/blob/984958122b962ab019a590f4fd01792de81b75df/server/src/main/java/org/apache/druid/client/DirectDruidClient.java#L150-L151 Or, constructing URLs in static methods: https://github.com/apache/incubator-druid/blob/984958122b962ab019a590f4fd01792de81b75df/server/src/main/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManager.java#L717-L735 This creates difficulty finding places in the code where a certain Druid API is called. Ideally, the experience should not be significantly worse than IDE's "Find usages" action. ### Proposed solution Every REST method (`@GET`/`@POST`-annotated) which is called within the cluster has an accompanying static method for forming an URL to call the method from a remote node. This accompanying static method is placed in a centralized place, such as `IntraClusterCalls` class. Javadocs for the REST method and the accompanying static method link to each other for easy navigation. All intra-cluster calls should be made using these static methods for creating URLs.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
