Issue-ID: HOLMES-100
Change-Id: I8cce9284ddb6de6d38b462314ecb0b07c8f22752
Signed-off-by: Congcong Peng <peng.congcong@zte.com.cn>
publisher.setUrl(DcaeConfigurationsCache.getPubSecInfo(dmaapConfigKey).getDmaapInfo()
.getTopicUrl());
publisher.publish(policyMsg);
publisher.setUrl(DcaeConfigurationsCache.getPubSecInfo(dmaapConfigKey).getDmaapInfo()
.getTopicUrl());
publisher.publish(policyMsg);
+ deleteRequestId(policyMsg);
log.info("send policyMsg: " + GsonUtil.beanToJson(policyMsg));
} catch (CorrelationException e) {
log.error("Failed to publish the control loop event to DMaaP", e);
log.info("send policyMsg: " + GsonUtil.beanToJson(policyMsg));
} catch (CorrelationException e) {
log.error("Failed to publish the control loop event to DMaaP", e);
+
+ private void deleteRequestId(PolicyMsg policyMsg){
+ String status = policyMsg.getClosedLoopEventStatus().toString();
+ if(status == "ABATED"){
+ String requestId = policyMsg.getRequestID();
+ for(String key: alarmUniqueRequestID.keySet()){
+ if(alarmUniqueRequestID.get(key).equals(requestId)){
+ alarmUniqueRequestID.remove(key);
+ }
+ }
+ log.info("Clear alarm, requestId deleted successful");
+ }
+ }