Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Add NodeConfigCollector to collect node configs(threadpool capacity etc.) from ES #252

Merged
merged 7 commits into from
Jul 20, 2020

Conversation

rguo-aws
Copy link
Contributor

@rguo-aws rguo-aws commented Jun 18, 2020

Issue #, if available:
#293

Description of changes:
Add a base class EsConfigNode as node level config collector
Create derived class NodeConfigCollector to collect threadpool config settings from each node and wrap it as flowunit to send to cluster RCA node.

Create unit test for this collector

Tests:

Code coverage percentage for this patch:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov
Copy link

codecov bot commented Jun 18, 2020

Codecov Report

Merging #252 into master will decrease coverage by 0.15%.
The diff coverage is 47.05%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #252      +/-   ##
============================================
- Coverage     66.65%   66.49%   -0.16%     
- Complexity     1838     1853      +15     
============================================
  Files           272      275       +3     
  Lines         12129    12229     +100     
  Branches        967      976       +9     
============================================
+ Hits           8084     8132      +48     
- Misses         3723     3770      +47     
- Partials        322      327       +5     
Impacted Files Coverage Δ Complexity Δ
...rmanceanalyzer/rca/framework/api/EsConfigNode.java 10.34% <10.34%> (ø) 2.00 <2.00> (?)
...a/framework/api/flow_units/NodeConfigFlowUnit.java 34.37% <34.37%> (ø) 5.00 <5.00> (?)
...er/rca/framework/api/summaries/HotNodeSummary.java 63.54% <50.00%> (-0.67%) 19.00 <1.00> (ø)
...rca/store/rca/remediation/NodeConfigCollector.java 80.00% <80.00%> (ø) 6.00 <6.00> (?)
...yzer/rca/framework/api/persist/SQLParsingUtil.java 95.45% <100.00%> (ø) 7.00 <0.00> (ø)
...yzer/rca/framework/api/summaries/ResourceUtil.java 97.29% <100.00%> (+0.52%) 4.00 <0.00> (ø)
...ormanceanalyzer/rca/store/rca/cluster/NodeKey.java 82.35% <100.00%> (+2.35%) 7.00 <1.00> (+1.00)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d61049...97238e9. Read the comment docs.

private int writeQueueCapacity;
private int searchQueueCapacity;

public <M extends Metric> NodeConfigurationRca(int rcaPeriod, M threadPool_queueCapacity) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you briefly describe the rationale of using an RCA node for this ? Do you think it would be cleaner if we add a new node type called ESConfigNode ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yojs are you suggesting that this should be different kind a NonLeafNode and not extend from RCA. With a FlowUnit that is more tuned to node configurations?

I think that is cleaner in general. Will need changes to PersistorBase logic which needs to be refactored anyway to work with non flow units that are not from RCAs. It can be picked separately.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created a new type of node EsConfigNode and extend the class as PerformanceControllerConfigCollector

@rguo-aws rguo-aws changed the title Add NodeConfigurationRca to collect threadpool config settings Add PerformanceControllerConfigCollector to collect threadpool config settings Jun 30, 2020
@rguo-aws rguo-aws requested a review from yojs June 30, 2020 17:41
/**
* this is a base class for node(vertex) in RCA graph that reads configuration settings from ES.
*/
public abstract class EsConfigNode extends NonLeafNode<ResourceFlowUnit<HotNodeSummary>> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was actually thinking of having a custom flow unit for this type of node. It doesn't really fit into the nested HotNodeSummary and HotResourceSummary lists - the terms healthy/unhealthy do not apply to a given queue capacity conf. The new flow unit could be simply have resource and values for those resources (for each node).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. that is actually what I am planing to do. but that requires refactoring in base cluster RCA. (i.e. need to create a base node level summary and extend it to something like EsConfigFlowunit). At this moment, we still have to add this to the HotNodeSummary so that it can be parsed by the cluster level RCA. I will create an issue and refactor it altogether.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add NodeConfigFlowUnit as a new type of Flowunit to carry node config settings across RCA graph

@rguo-aws rguo-aws added duplicate This issue or pull request already exists feature New feature and removed duplicate This issue or pull request already exists labels Jul 16, 2020
@rguo-aws rguo-aws changed the title Add PerformanceControllerConfigCollector to collect threadpool config settings Add NodeConfigCollector to collect node configs(threadpool capacity etc.) from ES Jul 20, 2020
Copy link
Contributor

@yojs yojs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create an corresponding issue for this change

/**
* a flowunit type to carry ES node configurations (queue/cache capacities, etc.)
*/
public class NodeConfigFlowUnit extends ResourceFlowUnit<HotNodeSummary> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the NodeConfig use its own summary such as NodeConfigSummary ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the problem of creating its own summary is this summary needs to be sent over to gRPC so we have to create a separate protobuf message for that. It would be better to keep the protobuf message as is to avoid duplicated code and create a new flowunit type as a wrapper to read/write config settings

@rguo-aws rguo-aws merged commit 9137257 into master Jul 20, 2020
@rguo-aws rguo-aws deleted the rguo-capacity-rca branch July 20, 2020 23:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants