-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Make custom allocation deciders use pull based extensions #20040
Conversation
This change converts AllocationDecider registration from push based on ClusterModule to implementing with a new ClusterPlugin interface. AllocationDecider instances are allowed to use only Settings and ClusterSettings.
@@ -19,21 +19,20 @@ | |||
|
|||
package org.elasticsearch.cluster.routing.allocation.decider; | |||
|
|||
import java.util.HashMap; | |||
import java.util.Map; |
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.
Your IDE seems to be non-consistent about putting these places. In some files you put them above the ES imports, in others, below (see AllocationDeciders.java). I think we decided originally to be consistent with putting them below the ES imports?
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.
My IDE is consistent, it just only moves when I optimize imports (usually to auto remove unused imports).
think we decided originally to be consistent with putting them below the ES imports?
Is this documented somewhere? I have intellij set to use the same order as eclipse defaults.
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.
Is this documented somewhere? I have intellij set to use the same order as eclipse defaults.
I don't think it's documented anywhere, it's mostly been that way for a really long time (which isn't an excuse, we should document it). We always used to use Intellij's defaults, where were to put the java.*
imports below ES imports, I think Eclipse's defaults are the other way around (the way this file is). It doesn't matter which way but it'd be nice to standardize only so we don't have them flipped around for every PR.
Personally I like the original Intellij style, but that's because I already have import-helpers configured to add them in that manner. It also means not switching them around for every PR since 90% of the codebase already uses this format.
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.
I opened #20062 for discussion
LGTM |
This change converts AllocationDecider registration from push based on
ClusterModule to implementing with a new ClusterPlugin interface.
AllocationDecider instances are allowed to use only Settings and
ClusterSettings.