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

Commit

Permalink
Making the queue cache collector in sync with the latest UT changes
Browse files Browse the repository at this point in the history
Co-authored-by: Aditya Jindal <[email protected]>
  • Loading branch information
adityaj1107 and Aditya Jindal authored Jul 29, 2020
1 parent 435a2e9 commit 324fd4d
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.amazon.opendistro.elasticsearch.performanceanalyzer.rca.framework.api.Resources;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.rca.framework.api.summaries.HotNodeSummary;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.rca.framework.api.summaries.ResourceUtil;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.rca.framework.util.InstanceDetails;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.rca.store.rca.cluster.NodeKey;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.rca.store.rca.cluster.QueueRejectionClusterRca;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.reader.ClusterDetailsEventProcessor;
Expand Down Expand Up @@ -83,14 +84,15 @@ public void testHighRejectionRemediation() {
RcaTestHelper.generateFlowUnit("node3", "127.0.0.3", Resources.State.UNHEALTHY, ResourceUtil.SEARCH_QUEUE_REJECTION),
RcaTestHelper.generateFlowUnit("node4", "127.0.0.4", Resources.State.HEALTHY)
);
appContext.getNodeConfigCache().put(new NodeKey("node1", "127.0.0.1"),
SEARCH_QUEUE_CAPACITY,5000);
appContext.getNodeConfigCache().put(new NodeKey("node1", "127.0.0.1"),
WRITE_QUEUE_CAPACITY,5000);
appContext.getNodeConfigCache().put(new NodeKey("node2", "127.0.0.2"),
WRITE_QUEUE_CAPACITY,5000);
appContext.getNodeConfigCache().put(new NodeKey("node3", "127.0.0.3"),
SEARCH_QUEUE_CAPACITY,5000);

appContext.getNodeConfigCache().put(new NodeKey(new InstanceDetails.Id("node1"),
new InstanceDetails.Ip("127.0.0.1")), SEARCH_QUEUE_CAPACITY,5000);
appContext.getNodeConfigCache().put(new NodeKey(new InstanceDetails.Id("node1"),
new InstanceDetails.Ip("127.0.0.1")), WRITE_QUEUE_CAPACITY,5000);
appContext.getNodeConfigCache().put(new NodeKey(new InstanceDetails.Id("node2"),
new InstanceDetails.Ip("127.0.0.2")), WRITE_QUEUE_CAPACITY,5000);
appContext.getNodeConfigCache().put(new NodeKey(new InstanceDetails.Id("node3"),
new InstanceDetails.Ip("127.0.0.3")), SEARCH_QUEUE_CAPACITY,5000);

QueueRejectionClusterRca queueClusterRca = new QueueRejectionClusterRca(1, nodeRca);
queueClusterRca.setAppContext(appContext);
Expand Down

0 comments on commit 324fd4d

Please sign in to comment.