Skip to content

Commit

Permalink
null check to calm spot check tests
Browse files Browse the repository at this point in the history
Signed-off-by: Kiran Prakash <[email protected]>
  • Loading branch information
kiranprakash154 committed Sep 29, 2022
1 parent fa303f6 commit 9923e46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@


import com.google.common.collect.ImmutableMap;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.performanceanalyzer.PerformanceAnalyzerApp;
Expand Down Expand Up @@ -77,8 +74,10 @@ public Decision operate() {
counter = 0;

for (final ResourceEnum cacheType : modifyCacheActionPriorityList) {
getActionsFromRca(cacheTypeBaseClusterRcaMap.get(cacheType), impactedNodes)
.forEach(decision::addAction);
BaseClusterRca baseClusterRcaMap = cacheTypeBaseClusterRcaMap.get(cacheType);
if (baseClusterRcaMap == null)
continue;
getActionsFromRca(baseClusterRcaMap, impactedNodes).forEach(decision::addAction);
}
return decision;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public boolean isMeasurementObserved(MeasurementSet toFind) {
if (statistics == null) {
return false;
}
for (IStatistic statistic : statMap.get(toFind)) {
for (IStatistic statistic : statistics) {
if (statistic != null && !statistic.isEmpty()) {
return true;
}
Expand Down

0 comments on commit 9923e46

Please sign in to comment.