-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added changes to integrade cpu AC to ResourceUsageCollector and Emit Stats #1
Conversation
Signed-off-by: Ajay Kumar Movva <[email protected]>
…ed AdmissionController Signed-off-by: Ajay Kumar Movva <[email protected]>
Signed-off-by: Ajay Kumar Movva <[email protected]>
Signed-off-by: Ajay Kumar Movva <[email protected]>
Signed-off-by: Ajay Kumar Movva <[email protected]>
Signed-off-by: Ajay Kumar Movva <[email protected]>
in -> new ConcreteShardRequest<>(requestReader, in), | ||
this::handlePrimaryRequest | ||
); | ||
if(transportPrimaryAction.equals(TransportShardBulkAction.ACTION_NAME + PRIMARY_ACTION_SUFFIX)){ |
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.
Lets add a comment why we are doing this
/** | ||
* Map to store the actions based on the type of the transport operation | ||
*/ | ||
public class AdmissionControlActionsMap { |
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.
Lets remove this
@@ -60,8 +68,8 @@ public void initialise() { | |||
/** | |||
* Handler to trigger registered admissionController |
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.
Lets add comments for method parameters as well , as action is mainly needed for debugging in this case
/** | ||
* | ||
* @param settings Immutable settings instance | ||
* @param clusterSettings ClusterSettings Instance | ||
* @param clusterService ClusterSettings Instance |
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.
Same comment everywhere - lets update comments to reflect the function parameters
return false; | ||
} | ||
|
||
private long getMaxCPULimitForAction(AdmissionControlActionType transportActionType) { |
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.
getCpuRejectionThreshold
*/ | ||
@Override | ||
public void writeTo(StreamOutput out) throws IOException { | ||
if (out.getVersion().onOrAfter(Version.CURRENT)) { |
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.
Use same version constant in both in and out
b8c2c63
to
fa39f9a
Compare
Description
[Describe what this change achieves]
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.