From 954440d0acc132151df7f828e2c63606f2ba9cdf Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Sun, 29 Oct 2017 11:38:28 +0800 Subject: Add the CL Name to the Cache when Starting Up Change-Id: I6a21707cf0475fa42aaf416088663c9f99af5a71 Issue-ID: HOLMES-82 Signed-off-by: Guangrong Fu --- .../src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java | 2 +- engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'engine-d/src/main/java/org') diff --git a/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java b/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java index 52f3915..37b39c0 100644 --- a/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java +++ b/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java @@ -41,7 +41,7 @@ public class DMaaPAlarmPolling implements Runnable { try { vesAlarmList = subscriber.subscribe(); } catch (CorrelationException e) { - log.error("Failed polling request alarm." + e.getMessage()); + log.error("Failed polling request alarm. " + e.getMessage()); } vesAlarmList.forEach(vesAlarm -> droolsEngine.putRaisedIntoStream(vesAlarm)); } diff --git a/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java b/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java index 5ccf29b..2ecea5e 100644 --- a/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java +++ b/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java @@ -38,6 +38,7 @@ import org.drools.runtime.StatefulKnowledgeSession; import org.drools.runtime.rule.FactHandle; import org.jvnet.hk2.annotations.Service; import org.onap.holmes.common.api.stat.VesAlarm; +import org.onap.holmes.common.dmaap.DmaapService; import org.onap.holmes.engine.request.DeployRuleRequest; import org.onap.holmes.common.api.entity.CorrelationRule; import org.onap.holmes.common.exception.CorrelationException; @@ -101,6 +102,7 @@ public class DroolsEngine { for (CorrelationRule rule : rules) { if (rule.getContent() != null) { deployRuleFromDB(rule.getContent()); + DmaapService.loopControlNames.put(rule.getPackageName(), rule.getClosedControlLoopName()); } } } -- cgit 1.2.3-korg