clintropolis opened a new pull request #10700:
URL: https://github.com/apache/druid/pull/10700


   ### Description
   Druid is like, absurdly extensible, which is pretty cool. Extensions are 
able to create entire new standalone tools and even full services, and they can 
be quite powerful because they have access to the wealth of facilities provided 
by the Druid codebase. However, they are not currently able to announce or 
discover themselves because we use a `NodeRole` enumeration which limits 
participation to known service types.
   
   This PR modifies `NodeRole` to instead be a class, mimicking the contract 
the enum provided so that there is no apparent change, and allowing custom 
`NodeRoles` to be used alongside the built-in service types. I've added an 
integration test that tests discovery and self discovery 
(`/status/selfDiscovered`, which wasn't previously covered by tests afaict) of 
both the built-in node types as well as an additional custom node-role service 
extension.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [x] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.
   - [x] added integration tests.
   - [x] been tested in a test Druid cluster.
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to