aboutsummaryrefslogtreecommitdiffstats
path: root/dcae-analytics-cdap-plugins/src/main/java
diff options
context:
space:
mode:
authoran4828 <nekrassov@att.com>2017-09-15 15:28:53 -0400
committeran4828 <nekrassov@att.com>2017-09-18 09:24:04 -0400
commit4edf0fa48892bf38d0e3838d125e9bf2324b38e0 (patch)
tree7216dae042828ec2cf38cb9300af1a32a17b3b91 /dcae-analytics-cdap-plugins/src/main/java
parent82aaf956855507e5a72d5ef5b45e398430d04a7a (diff)
Add support for ABATED alerts within CDAP TCA
Change-Id: Iae560a2d0a47b30b41cd31206dc481a08e4930f7 Signed-off-by: an4828 <nekrassov@att.com> Issue-ID: DCAEGEN2-107 Signed-off-by: an4828 <nekrassov@att.com>
Diffstat (limited to 'dcae-analytics-cdap-plugins/src/main/java')
-rw-r--r--dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/sparkcompute/tca/SimpleTCAPlugin.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/sparkcompute/tca/SimpleTCAPlugin.java b/dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/sparkcompute/tca/SimpleTCAPlugin.java
index b915ade..cc11512 100644
--- a/dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/sparkcompute/tca/SimpleTCAPlugin.java
+++ b/dcae-analytics-cdap-plugins/src/main/java/org/openecomp/dcae/apod/analytics/cdap/plugins/sparkcompute/tca/SimpleTCAPlugin.java
@@ -39,7 +39,7 @@ import org.openecomp.dcae.apod.analytics.cdap.common.utils.ValidationUtils;
import org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.tca.SimpleTCAPluginConfig;
import org.openecomp.dcae.apod.analytics.cdap.plugins.utils.CDAPPluginUtils;
import org.openecomp.dcae.apod.analytics.cdap.plugins.validator.SimpleTCAPluginConfigValidator;
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerFunctionalRole;
+import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;
import org.openecomp.dcae.apod.analytics.tca.processor.TCACEFJsonProcessor;
@@ -128,12 +128,12 @@ public class SimpleTCAPlugin extends SparkCompute<StructuredRecord, StructuredRe
LOG.debug("VES Threshold Violation Detected.An alert message is be generated: {}",
alertMessage);
- final MetricsPerFunctionalRole metricsPerFunctionalRole =
- processorContextWithViolations.getMetricsPerFunctionalRole();
- if (metricsPerFunctionalRole != null
- && metricsPerFunctionalRole.getThresholds() != null
- && metricsPerFunctionalRole.getThresholds().get(0) != null) {
- final Threshold violatedThreshold = metricsPerFunctionalRole.getThresholds().get(0);
+ final MetricsPerEventName metricsPerEventName =
+ processorContextWithViolations.getMetricsPerEventName();
+ if (metricsPerEventName != null
+ && metricsPerEventName.getThresholds() != null
+ && metricsPerEventName.getThresholds().get(0) != null) {
+ final Threshold violatedThreshold = metricsPerEventName.getThresholds().get(0);
LOG.debug("CEF Message: {}, Violated Threshold: {}", cefMessage, violatedThreshold);
}