New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow druid-kubernetes-overlord-extensions to be loaded in any druid service #13872
Allow druid-kubernetes-overlord-extensions to be loaded in any druid service #13872
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 this seems consistent with other modules that should alter behavior based on where they are run
I think you might get hit by the code coverage bot though. If that happens search for files ending with ModuleTest
for examples which all typically do something with Guice.createInjector
to make an injector and set some stuff and make sure the right things happen.
It looks like you also got caught up by the dependency bot for using org.apache.commons.collections4
without explicitly adding it to the pom.
Warning: Used undeclared dependencies found:
Warning: org.apache.commons:commons-collections4:jar:4.2:provided
so either add to the pom or don't use it (it looks like LagBasedAutoScaler
is the only thing using org.apache.commons.collections4
in druid-indexing-service
)
binder, | ||
Key.get(TaskRunnerFactory.class) | ||
); | ||
if (SetUtils.emptyIfNull(nodeRoles).contains(NodeRole.OVERLORD)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turns out that there is an easier way to do this:
@LoadScope(roles = NodeRole.OVERLORD_JSON_NAME)
public class K8sOverlordModule implements DruidModule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oof, I even reviewed the change that added that, but totally forgot about it 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…-any-druid-service
…module-loadable-in-any-druid-service
https://github.com/nlippis/druid into druid-kubernetes-module-loadable-in-any-druid-service
…ubernetes-module-loadable-in-any-druid-service
…service (apache#13872) Allow druid-kubernetes-overlord-extensions to be loaded in any druid service
Allow druid-kubernetes-overlord-extensions to be loaded in any druid service
Only setup kubernetes task runner bindings when the node has the overlord role
Release note
Key changed/added classes in this PR
K8sOverlordModule.java
This PR has: