Improvement of README file, and miscellaneous code improvements

Removal of unnecessary code to improve legibility
Introduction of new class for the Director subcomponent to allow defining functionality specific to it
Improvement of code organization
Additions to README file to enable better code understading and provide a high-level overview of the operational phases of SLOViD

Change-Id: Ie52de0a2446f376f7612473a69e9a0eae10e5c80
This commit is contained in:
Andreas Tsagkaropoulos 2023-11-23 14:02:52 +02:00
parent 8adcb5e070
commit 4ec762fd60
25 changed files with 136 additions and 104 deletions

View File

@ -4,7 +4,22 @@
The SLO Severity-based Violation Detector is a component which receives predicted and actual monitoring metric values, and produces AMQP messages which denote i) the calculated severity ii) the probability that a reconfiguration will be required and iii) the timestamp which we refer to.
The component can run either using a compiled jar file, or be packaged to a Docker container and run in containerized form.
The component can run either using a compiled jar file, or be packaged to a Docker container and run in containerized form. At a high level, the component runs through the following operational phases:
Operational phases
-----------------------
1. Initialization of generic execution parameters
2. Choice of operational mode (Detector or Director-Detector)
3. If the operational mode is Director-Detector then the following steps are carried out:
- Initialization of the subscription to the topics the Director-Detector is responsible for
4. If the operational mode is Detector then the following steps are carried out:
- Initialization of the internal structures representing the SLO rules and the monitoring metrics
- Subscription to metric_list topic and initialization of new subscribers based on initial message
- Subscription to topic_for_lost_device_announcement
- Continuous calculation of Severity based on incoming realtime and predicted metrics, and creation of severity output messages when relevant input has been received
- Continuous monitoring of reconfiguration statistics and adaptation of the behaviour of the component as appropriate
## Configuration
@ -142,8 +157,28 @@ To illustrate, in the case that an SLO message identical to the simple SLO examp
### Development
#### General Remarks
Starting new threads in the SLO Violation Detection component should only be done using the CharacterizedThread class, as opposed to using plain Threads - to reassure that Threads are being defined in a way which permits their appropriate management (registration/removal).
#### Internal structure
Execution in the SLO Violation Detector component begins at the Main class, part of the `runtime` package inside the src/main/java folder. Immediately, following some basic initializations the character of the program is determined - either Director-Detector or simple Detector - and then the relevant subcomponents are initialized. If the component is initialized as a Director-Detector, it will also have some active Spring Boot endpoints using which, it will be able to listen to incoming requests and provide information. The way this information is provided, is detailed in the Director and the Detector RequestMapping classes inside the `runtime` package.
Generic constants which should be available throughout the program, are included in the `Constants` class inside the `configuration` package.
The `metric_retrieval` package includes the AttributeSubscription class which manages the subscription to all metrics (or attributes) which are included in a particular SLO rule.
The `slo_rule_modelling` package includes classes which are important to setup the methods in which Severity calculations are described for different kinds of rules. Inside it are the important SLORule and SLOSubRule classes.
The heart of the SLO Violation Detector is inside the `slo_violation_detector_engine` package, which contains the specific subcomponent classes which describe the behaviour of the two subcomponents of the SLOViD: the Director and the Detector. Also, the `Runnables` class inside it, contains the all runnables and runnable-like classes which do not tightly belong to their surrounding code. Classes are organized in three sub-packages: the `director`, `detector`, and `generic` sub-packages, which include classes specific to the director subcomponent, the detector subcomponent and all subcomponents, respectively.
The `utilities` subpackage contains miscellaneous utility classes which undertake miscellaneous tasks, including the SLOViolationCalculator class which performs the actual severity calculations. Similarly, the `utility_beans` package contains classes designed to model individual aspects of the behaviour of the component.
The `src/main/resources` folder contains files which are either used at runtime to fetch resources necessary for the proper execution of the program, or files which help with the testing of the component. Most notable are the property files under the config folder which directly impact the behaviour of the program, and the application.properties file which include parameters which regulate the execution of the Spring Boot part of the component (if a director component is spawned).
The `src/test` folder contains miscellaneous tests which are useful to verify the correct behaviour of the component.
### Docker container build

View File

@ -9,8 +9,8 @@
package configuration;
import java.net.URI;
import java.util.ArrayList;
import java.util.logging.Level;
public class Constants {
//String constants
@ -31,6 +31,7 @@ public class Constants {
public static String topic_for_lost_device_announcement = "eu.nebulouscloud.device_lost";
public static String slo_rules_topic = "eu.nebulouscloud.monitoring.slo.new";
public static String metric_list_topic = "eu.nebulouscloud.monitoring.metric_list";
public static ArrayList<String> director_subscription_topics;
public static double slo_violation_probability_threshold = 0.5; //The threshold over which the probability of a predicted slo violation should be to have a violation detection
public static int kept_values_per_metric = 5; //Default to be overriden from the configuration file. This indicates how many metric values are kept to calculate the "previous" metric value during the rate of change calculation
public static String roc_calculation_mode = "prototype";

View File

@ -11,7 +11,7 @@ package metric_retrieval;
//import eu.melodic.event.brokerclient.BrokerSubscriber;
//import eu.melodic.event.brokerclient.templates.EventFields;
//import eu.melodic.event.brokerclient.templates.TopicNames;
import slo_violation_detector_engine.DetectorSubcomponent;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import utility_beans.BrokerSubscriber;
import utility_beans.BrokerSubscriber.EventFields;
import utility_beans.BrokerSubscriber.TopicNames;
@ -31,8 +31,6 @@ import java.util.function.BiFunction;
import java.util.logging.Logger;
import static configuration.Constants.*;
import static slo_violation_detector_engine.SLOViolationDetectorStateUtils.*;
import static utility_beans.CharacterizedThread.CharacterizedThreadType.slo_bound_running_thread;
import static utility_beans.PredictedMonitoringAttribute.getPredicted_monitoring_attributes;
import static utility_beans.RealtimeMonitoringAttribute.update_monitoring_attribute_value;

View File

@ -1,13 +1,11 @@
package runtime;
import org.springframework.web.bind.annotation.*;
import slo_violation_detector_engine.DetectorSubcomponent;
import java.io.IOException;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import static configuration.Constants.default_handled_application_name;
import static runtime.Main.detectors;
import static slo_violation_detector_engine.DetectorSubcomponent.detector_integer_id;
import static slo_violation_detector_engine.detector.DetectorSubcomponent.detector_integer_id;
import static utilities.DebugDataSubscription.debug_data_generation;
import static utility_beans.CharacterizedThread.CharacterizedThreadRunMode.detached;
@RestController

View File

@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import slo_violation_detector_engine.DetectorSubcomponent;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import utility_beans.CharacterizedThread;
import utility_beans.RealtimeMonitoringAttribute;

View File

@ -12,7 +12,8 @@ package runtime;
//import eu.melodic.event.brokerclient.BrokerSubscriber;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import slo_violation_detector_engine.DetectorSubcomponent;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import slo_violation_detector_engine.director.DirectorSubcomponent;
import utility_beans.*;
import java.io.IOException;
@ -24,7 +25,8 @@ import static configuration.Constants.*;
import static java.util.logging.Level.INFO;
import static utilities.OperationalModeUtils.getSLOViolationDetectionOperationalMode;
import static slo_violation_detector_engine.SLOViolationDetectorStateUtils.*;
import static slo_violation_detector_engine.generic.SLOViolationDetectorStateUtils.*;
import static utilities.OperationalModeUtils.get_director_subscription_topics;
import static utility_beans.CharacterizedThread.CharacterizedThreadRunMode.detached;
@ -70,17 +72,19 @@ public class Main {
slo_violation_probability_threshold = Double.parseDouble(prop.getProperty("slo_violation_probability_threshold"));
slo_violation_determination_method = prop.getProperty("slo_violation_determination_method");
maximum_acceptable_forward_predictions = Integer.parseInt(prop.getProperty("maximum_acceptable_forward_predictions"));
director_subscription_topics = get_director_subscription_topics();
DetectorSubcomponent detector = new DetectorSubcomponent(default_handled_application_name,detached);
detectors.add(detector);
ArrayList<String> unbounded_metric_strings = new ArrayList<>(Arrays.asList(prop.getProperty("metrics_bounds").split(",")));
for (String metric_string : unbounded_metric_strings) {
detector.getSubcomponent_state().getMonitoring_attributes_bounds_representation().put(metric_string.split(";")[0], metric_string.split(";", 2)[1]);
detector.getSubcomponent_state().getMonitoring_attributes_bounds_representation().put(metric_string.split(";")[0], metric_string.split(";", 2)[1]); //TODO delete once this information is successfully received from the AMQP broker
}
} //initialization
if (operational_mode.equals(OperationalMode.DETECTOR)) {
Logger.getAnonymousLogger().log(INFO,"Starting new Detector instance");
Logger.getAnonymousLogger().log(INFO,"Starting new Detector instance"); //This detector instance has been already started in the initialization block above as it will be commonly needed both for the plain Detector and the Director-Detector
}else if (operational_mode.equals(OperationalMode.DIRECTOR)){
Logger.getAnonymousLogger().log(INFO,"Starting new Director and new Detector instance");
DirectorSubcomponent director = new DirectorSubcomponent();
SpringApplication.run(Main.class, args);
Logger.getAnonymousLogger().log(INFO,"Execution completed");
}

View File

@ -12,7 +12,7 @@ import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import slo_violation_detector_engine.DetectorSubcomponent;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import utilities.MathUtils;
import utilities.SLOViolationCalculator;
import utility_beans.RealtimeMonitoringAttribute;

View File

@ -8,7 +8,7 @@
package slo_rule_modelling;
import slo_violation_detector_engine.DetectorSubcomponent;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import utility_beans.PredictedMonitoringAttribute;
import java.util.ArrayList;

View File

@ -1,19 +0,0 @@
package slo_violation_detector_engine;
import utility_beans.CharacterizedThread;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.atomic.AtomicBoolean;
public class DirectorSubcomponent extends SLOViolationDetectorSubcomponent{
public HashMap<String,Thread> persistent_running_director_threads = new HashMap<>();
Integer id = 1;
public static HashMap<String,DirectorSubcomponent> director_subcomponents = new HashMap<>();
public DirectorSubcomponent(){
super.thread_type = CharacterizedThread.CharacterizedThreadType.persistent_running_director_thread;
director_subcomponents.put(String.valueOf(id),this);
id++;
}
}

View File

@ -1,7 +1,8 @@
package slo_violation_detector_engine;
package slo_violation_detector_engine.detector;
import org.json.simple.JSONObject;
import processing_logic.Runnables;
import slo_violation_detector_engine.generic.Runnables;
import slo_violation_detector_engine.generic.SLOViolationDetectorSubcomponent;
import utility_beans.*;
@ -12,11 +13,11 @@ import java.util.function.BiFunction;
import java.util.logging.Logger;
import static configuration.Constants.*;
import static slo_violation_detector_engine.SLOViolationDetectorStateUtils.*;
import static slo_violation_detector_engine.generic.SLOViolationDetectorStateUtils.*;
import static utility_beans.CharacterizedThread.CharacterizedThreadRunMode.attached;
public class DetectorSubcomponent extends SLOViolationDetectorSubcomponent{
public class DetectorSubcomponent extends SLOViolationDetectorSubcomponent {
public static final SynchronizedInteger detector_integer_id = new SynchronizedInteger();
public static HashMap<String,DetectorSubcomponent> detector_subcomponents = new HashMap<>(); //A HashMap containing all detector subcomponents
private DetectorSubcomponentState subcomponent_state;

View File

@ -1,4 +1,4 @@
package slo_violation_detector_engine;
package slo_violation_detector_engine.detector;
import org.apache.commons.collections4.queue.CircularFifoQueue;
import slo_rule_modelling.SLORule;

View File

@ -1,7 +1,6 @@
package slo_violation_detector_engine;
package slo_violation_detector_engine.detector;
import metric_retrieval.AttributeSubscription;
import org.apache.commons.collections4.queue.CircularFifoQueue;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
@ -25,10 +24,10 @@ import java.util.logging.Logger;
import java.util.stream.Collectors;
import static configuration.Constants.*;
import static processing_logic.Runnables.device_lost_topic_subscriber_runnable;
import static processing_logic.Runnables.get_severity_calculation_runnable;
import static slo_violation_detector_engine.generic.Runnables.device_lost_topic_subscriber_runnable;
import static slo_violation_detector_engine.generic.Runnables.get_severity_calculation_runnable;
import static runtime.Main.*;
import static slo_violation_detector_engine.SLOViolationDetectorStateUtils.*;
import static slo_violation_detector_engine.generic.SLOViolationDetectorStateUtils.*;
import static utility_beans.PredictedMonitoringAttribute.getPredicted_monitoring_attributes;
public class DetectorSubcomponentUtilities {
@ -282,9 +281,6 @@ public class DetectorSubcomponentUtilities {
//Implementation of 'Lost edge device' thread
CharacterizedThread.create_new_thread(device_lost_topic_subscriber_runnable,"device_lost_topic_subscriber_thread",true,associated_detector_subcomponent);

View File

@ -0,0 +1,37 @@
package slo_violation_detector_engine.director;
import slo_violation_detector_engine.generic.SLOViolationDetectorSubcomponent;
import utility_beans.CharacterizedThread;
import java.util.HashMap;
import static utilities.OperationalModeUtils.get_director_subscription_topics;
public class DirectorSubcomponent extends SLOViolationDetectorSubcomponent {
public HashMap<String,Thread> persistent_running_director_threads = new HashMap<>();
Integer id = 1;
public static HashMap<String,DirectorSubcomponent> director_subcomponents = new HashMap<>();
private static DirectorSubcomponent master_director;
public static DirectorSubcomponent getMaster_director() {
return master_director;
}
public static void setMaster_director(DirectorSubcomponent master_director) {
DirectorSubcomponent.master_director = master_director;
}
public DirectorSubcomponent(){
super.thread_type = CharacterizedThread.CharacterizedThreadType.persistent_running_director_thread;
create_director_topic_subscribers();
director_subcomponents.put(String.valueOf(id),this);
id++;
master_director = this;
}
private void create_director_topic_subscribers(){
for (String subscription_topic : get_director_subscription_topics()){
//TODO subscribe to each topic, creating a Characterized thread for each of them
}
}
}

View File

@ -1,15 +1,13 @@
package processing_logic;
package slo_violation_detector_engine.generic;
//import eu.melodic.event.brokerclient.BrokerPublisher;
import slo_violation_detector_engine.DetectorSubcomponent;
import slo_violation_detector_engine.DetectorSubcomponentUtilities;
import slo_violation_detector_engine.SLOViolationDetectorStateUtils;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import slo_violation_detector_engine.detector.DetectorSubcomponentUtilities;
import utility_beans.BrokerPublisher;
import org.json.simple.JSONObject;
import slo_rule_modelling.SLORule;
import utility_beans.CharacterizedThread;
import java.io.IOException;
import java.sql.Timestamp;
import java.time.Clock;
import java.util.Date;
@ -20,9 +18,9 @@ import java.util.logging.Logger;
import static configuration.Constants.*;
import static java.lang.Thread.sleep;
import static slo_rule_modelling.SLORule.process_rule_value;
import static slo_violation_detector_engine.DetectorSubcomponent.*;
import static slo_violation_detector_engine.SLOViolationDetectorStateUtils.*;
import static slo_violation_detector_engine.DetectorSubcomponentUtilities.*;
import static slo_violation_detector_engine.detector.DetectorSubcomponent.*;
import static slo_violation_detector_engine.generic.SLOViolationDetectorStateUtils.*;
import static slo_violation_detector_engine.detector.DetectorSubcomponentUtilities.*;
import static utilities.DebugDataSubscription.*;
public class Runnables {
@ -57,7 +55,7 @@ public class Runnables {
public static Runnable device_lost_topic_subscriber_runnable = () -> {
while (true) {
device_lost_subscriber.subscribe(device_lost_subscriber_function, new AtomicBoolean(false)); //This subscriber should be immune to stop signals
Logger.getAnonymousLogger().log(info_logging_level,"Broker unavailable, will try to reconnect after 10 seconds");
Logger.getAnonymousLogger().log(info_logging_level,"A device used by the platform was lost, will therefore trigger a reconfiguration");
try {
Thread.sleep(10000);
}catch (InterruptedException i){
@ -84,11 +82,6 @@ public class Runnables {
BrokerPublisher persistent_publisher = new BrokerPublisher(topic_for_severity_announcement, prop.getProperty("broker_ip_url"), prop.getProperty("broker_username"), prop.getProperty("broker_password"), amq_library_configuration_location);
while (!detector.stop_signal.get()) {
/*try {
Thread.sleep(time_horizon_seconds*1000);
} catch (InterruptedException e) {
e.printStackTrace();
}*/
synchronized (detector.PREDICTION_EXISTS) {
while (!detector.PREDICTION_EXISTS.getValue()) {
try {
@ -132,19 +125,6 @@ public class Runnables {
Logger.getAnonymousLogger().log(info_logging_level, "Targeted_prediction_time " + targeted_prediction_time);
Runnable internal_severity_calculation_runnable = () -> {
try {
/*
synchronized (ADAPTATION_TIMES_MODIFY) {
while (!ADAPTATION_TIMES_MODIFY.getValue()) {
ADAPTATION_TIMES_MODIFY.wait();
}
ADAPTATION_TIMES_MODIFY.setValue(false);
adaptation_times.remove(targeted_prediction_time);//remove from the list of timepoints which should be processed. Later this timepoint will be added to the adaptation_times_to_remove HashSet to remove any data associated with it
ADAPTATION_TIMES_MODIFY.setValue(true);
ADAPTATION_TIMES_MODIFY.notifyAll();
}
//adaptation_times_pending_processing.add(targeted_prediction_time);
*/
synchronized (detector.PREDICTION_EXISTS) {
detector.PREDICTION_EXISTS.setValue(detector.getSubcomponent_state().adaptation_times.size() > 0);
}

View File

@ -1,7 +1,5 @@
package slo_violation_detector_engine;
package slo_violation_detector_engine.generic;
import org.apache.commons.collections4.queue.CircularFifoQueue;
import slo_rule_modelling.SLORule;
import utility_beans.*;
import java.io.File;
@ -9,11 +7,7 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.logging.Logger;
import static configuration.Constants.*;

View File

@ -1,4 +1,4 @@
package slo_violation_detector_engine;
package slo_violation_detector_engine.generic;
import utility_beans.CharacterizedThread;

View File

@ -2,9 +2,8 @@ package utilities;
//import eu.melodic.event.brokerclient.BrokerPublisher;
//import eu.melodic.event.brokerclient.BrokerSubscriber;
import processing_logic.Runnables;
import slo_violation_detector_engine.DetectorSubcomponent;
import slo_violation_detector_engine.DetectorSubcomponentUtilities;
import slo_violation_detector_engine.generic.Runnables;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import utility_beans.BrokerSubscriber;
import org.apache.commons.collections4.queue.CircularFifoQueue;
import slo_rule_modelling.SLOSubRule;
@ -19,10 +18,8 @@ import java.util.logging.Logger;
import static configuration.Constants.amq_library_configuration_location;
import static configuration.Constants.info_logging_level;
import static slo_violation_detector_engine.DetectorSubcomponent.detector_subcomponents;
import static slo_violation_detector_engine.DirectorSubcomponent.director_subcomponents;
import static slo_violation_detector_engine.SLOViolationDetectorStateUtils.*;
import static utility_beans.CharacterizedThread.CharacterizedThreadType.slo_bound_running_thread;
import static slo_violation_detector_engine.detector.DetectorSubcomponent.detector_subcomponents;
import static slo_violation_detector_engine.director.DirectorSubcomponent.director_subcomponents;
import static utility_beans.RealtimeMonitoringAttribute.get_metric_value;
/**

View File

@ -9,7 +9,7 @@
package utilities;
import slo_rule_modelling.SLOSubRule;
import slo_violation_detector_engine.DetectorSubcomponentState;
import slo_violation_detector_engine.detector.DetectorSubcomponentState;
import utility_beans.MonitoringAttributeStatistics;
import utility_beans.RealtimeMonitoringAttribute;
@ -18,7 +18,6 @@ import java.util.ArrayList;
import static configuration.Constants.epsilon;
import static configuration.Constants.roc_limit;
import static utility_beans.PredictedMonitoringAttribute.*;
import slo_violation_detector_engine.DetectorSubcomponentState.*;
public class MonitoringAttributeUtilities {

View File

@ -2,10 +2,24 @@ package utilities;
import utility_beans.OperationalMode;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import static configuration.Constants.*;
public class OperationalModeUtils{
public static ArrayList<String> get_director_subscription_topics(){
return new ArrayList<>
(List.of(
topic_for_severity_announcement,
topic_for_lost_device_announcement,
slo_rules_topic,
metric_list_topic
));
}
public static OperationalMode getSLOViolationDetectionOperationalMode(String operational_mode) {
if (operational_mode.equalsIgnoreCase("DIRECTOR")){
return OperationalMode.DIRECTOR;

View File

@ -1,8 +1,8 @@
package utility_beans;
import slo_violation_detector_engine.DetectorSubcomponent;
import slo_violation_detector_engine.DirectorSubcomponent;
import slo_violation_detector_engine.SLOViolationDetectorSubcomponent;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import slo_violation_detector_engine.director.DirectorSubcomponent;
import slo_violation_detector_engine.generic.SLOViolationDetectorSubcomponent;
import java.util.logging.Level;
import java.util.logging.Logger;

View File

@ -8,7 +8,7 @@
package utility_beans;
import slo_violation_detector_engine.DetectorSubcomponent;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import java.util.*;
import java.util.logging.Level;
@ -16,7 +16,6 @@ import java.util.logging.Logger;
import static configuration.Constants.*;
import static utilities.MonitoringAttributeUtilities.isZero;
import static utility_beans.RealtimeMonitoringAttribute.*;
public class PredictedMonitoringAttribute {

View File

@ -9,7 +9,7 @@
package utility_beans;
import org.apache.commons.collections4.queue.CircularFifoQueue;
import slo_violation_detector_engine.DetectorSubcomponent;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import utilities.MathUtils;
import java.util.Collection;

View File

@ -7,13 +7,11 @@
*/
import org.junit.Test;
import slo_violation_detector_engine.DetectorSubcomponent;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import utility_beans.CharacterizedThread;
import utility_beans.MonitoringAttributeStatistics;
import utility_beans.RealtimeMonitoringAttribute;
import utility_beans.PredictedMonitoringAttribute;
import java.util.Arrays;
import java.util.List;
import static configuration.Constants.default_handled_application_name;

View File

@ -8,7 +8,7 @@
import org.junit.Test;
import slo_rule_modelling.SLOSubRule;
import slo_violation_detector_engine.DetectorSubcomponent;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import utilities.SLOViolationCalculator;
import utility_beans.CharacterizedThread;
import utility_beans.MonitoringAttributeStatistics;

View File

@ -11,7 +11,7 @@
//import eu.melodic.event.brokerclient.templates.EventFields;
//import eu.melodic.event.brokerclient.templates.TopicNames;
import slo_violation_detector_engine.DetectorSubcomponent;
import slo_violation_detector_engine.detector.DetectorSubcomponent;
import utility_beans.*;
import utility_beans.BrokerSubscriber.*;
import org.json.simple.JSONArray;
@ -41,7 +41,7 @@ import java.util.logging.Logger;
import static configuration.Constants.*;
import static slo_rule_modelling.SLORule.process_rule_value;
import static slo_violation_detector_engine.DetectorSubcomponentUtilities.initialize_subrule_and_attribute_associations;
import static slo_violation_detector_engine.detector.DetectorSubcomponentUtilities.initialize_subrule_and_attribute_associations;
import static utility_beans.CharacterizedThread.CharacterizedThreadRunMode.detached;
import static utility_beans.PredictedMonitoringAttribute.getPredicted_monitoring_attributes;
import static utility_beans.RealtimeMonitoringAttribute.update_monitoring_attribute_value;