2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit e95764be authored by Alessio Netti's avatar Alessio Netti
Browse files

Analytics: refactoring of Analyzers to Operators

- Make clean might be required
parent 33252803
...@@ -4,7 +4,7 @@ include ../config.mk ...@@ -4,7 +4,7 @@ include ../config.mk
CXXFLAGS += -DBOOST_NETWORK_ENABLE_HTTPS -I../common/include -I$(DCDBDEPLOYPATH)/include -I$(DCDBDEPLOYPATH)/include/opencv4 CXXFLAGS += -DBOOST_NETWORK_ENABLE_HTTPS -I../common/include -I$(DCDBDEPLOYPATH)/include -I$(DCDBDEPLOYPATH)/include/opencv4
LIBS = -L../lib -L$(DCDBDEPLOYPATH)/lib/ -ldl -lboost_system -lboost_thread -lboost_log_setup -lboost_log -lboost_regex -lpthread -rdynamic LIBS = -L../lib -L$(DCDBDEPLOYPATH)/lib/ -ldl -lboost_system -lboost_thread -lboost_log_setup -lboost_log -lboost_regex -lpthread -rdynamic
ANALYZERS = aggregator regressor job_aggregator testeranalyzer filesink smucngperfanalyzer OPERATORS = aggregator regressor job_aggregator testeroperator filesink smucngperf
ifeq ($(OS),Darwin) ifeq ($(OS),Darwin)
BACNET_PORT = bsd BACNET_PORT = bsd
...@@ -16,47 +16,47 @@ else ...@@ -16,47 +16,47 @@ else
LIBFLAGS = -shared -Wl,-soname, LIBFLAGS = -shared -Wl,-soname,
PLUGINFLAGS = -fPIC PLUGINFLAGS = -fPIC
endif endif
ANALYZER_LIBS = $(foreach p,$(ANALYZERS),libdcdbanalyzer_$(p).$(LIBEXT)) OPERATOR_LIBS = $(foreach p,$(OPERATORS),libdcdboperator_$(p).$(LIBEXT))
all: $(ANALYZER_LIBS) all: $(OPERATOR_LIBS)
debug: CXXFLAGS += -DDEBUG debug: CXXFLAGS += -DDEBUG
debug: all debug: all
clean: clean:
rm -f $(ANALYZER_LIBS) $(shell find . -name "*.o") rm -f $(OPERATOR_LIBS) $(shell find . -name "*.o")
rm -f ../common/src/sensornavigator.o rm -f ../common/src/sensornavigator.o
$(OBJS) : %.o : %.cpp $(OBJS) : %.o : %.cpp
install_analyzer: $(ANALYZER_LIBS) install_operator: $(OPERATOR_LIBS)
install $^ $(DCDBDEPLOYPATH)/lib/ install $^ $(DCDBDEPLOYPATH)/lib/
install_conf: $(foreach p,$(ANALYZERS),config/$(p).conf) install_conf: $(foreach p,$(OPERATORS),config/$(p).conf)
install -m 644 $^ $(DCDBDEPLOYPATH)/etc/ install -m 644 $^ $(DCDBDEPLOYPATH)/etc/
install: install_analyzer install: install_operator
@echo "Done with installation." @echo "Done with installation."
@echo "=====================================" @echo "====================================="
@echo "To copy the configuration files type:" @echo "To copy the configuration files type:"
@echo " > make install_conf" @echo " > make install_conf"
analyzers/%.o: CXXFLAGS+= $(PLUGINFLAGS) operators/%.o: CXXFLAGS+= $(PLUGINFLAGS)
../common/src/sensornavigator.o: CXXFLAGS+= $(PLUGINFLAGS) ../common/src/sensornavigator.o: CXXFLAGS+= $(PLUGINFLAGS)
libdcdbanalyzer_aggregator.$(LIBEXT): analyzers/aggregator/AggregatorAnalyzer.o analyzers/aggregator/AggregatorConfigurator.o ../common/src/sensornavigator.o libdcdboperator_aggregator.$(LIBEXT): operators/aggregator/AggregatorOperator.o operators/aggregator/AggregatorConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex $(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
libdcdbanalyzer_regressor.$(LIBEXT): analyzers/regressor/RegressorAnalyzer.o analyzers/regressor/RegressorConfigurator.o ../common/src/sensornavigator.o libdcdboperator_regressor.$(LIBEXT): operators/regressor/RegressorOperator.o operators/regressor/RegressorConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex -lopencv_core -lopencv_ml $(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex -lopencv_core -lopencv_ml
libdcdbanalyzer_job_aggregator.$(LIBEXT): analyzers/aggregator/AggregatorAnalyzer.o analyzers/aggregator/JobAggregatorAnalyzer.o analyzers/aggregator/JobAggregatorConfigurator.o ../common/src/sensornavigator.o libdcdboperator_job_aggregator.$(LIBEXT): operators/aggregator/AggregatorOperator.o operators/aggregator/JobAggregatorOperator.o operators/aggregator/JobAggregatorConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex $(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
libdcdbanalyzer_testeranalyzer.$(LIBEXT): analyzers/testeranalyzer/TesterAnalyzer.o analyzers/testeranalyzer/TesterAnalyzerConfigurator.o ../common/src/sensornavigator.o libdcdboperator_testeroperator.$(LIBEXT): operators/testeroperator/TesterOperator.o operators/testeroperator/TesterOperatorConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex $(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
libdcdbanalyzer_filesink.$(LIBEXT): analyzers/filesink/FilesinkAnalyzer.o analyzers/filesink/FilesinkConfigurator.o ../common/src/sensornavigator.o libdcdboperator_filesink.$(LIBEXT): operators/filesink/FilesinkOperator.o operators/filesink/FilesinkConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex $(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
libdcdbanalyzer_smucngperfanalyzer.$(LIBEXT): analyzers/smucngperfanalyzer/SMUCNGPerfAnalyzer.o analyzers/smucngperfanalyzer/SMUCNGPerfConfigurator.o ../common/src/sensornavigator.o libdcdboperator_smucngperf.$(LIBEXT): operators/smucngperf/SMUCNGPerfOperator.o operators/smucngperf/SMUCNGPerfConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex $(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
This diff is collapsed.
...@@ -2,14 +2,14 @@ global { ...@@ -2,14 +2,14 @@ global {
mqttPrefix /test mqttPrefix /test
} }
template_analyzer def1 { template_operator def1 {
interval 1000 interval 1000
minValues 3 minValues 3
duplicate false duplicate false
streaming true streaming true
} }
analyzer tes1 { operator tes1 {
default def1 default def1
window 2000 window 2000
relative false relative false
...@@ -32,7 +32,7 @@ relative false ...@@ -32,7 +32,7 @@ relative false
} }
analyzer tes2 { operator tes2 {
default def1 default def1
interval 1500 interval 1500
relative true relative true
......
//================================================================================ //================================================================================
// Name : JobAnalyzerConfiguratorTemplate.h // Name : JobOperatorConfiguratorTemplate.h
// Author : Alessio Netti // Author : Alessio Netti
// Contact : info@dcdb.it // Contact : info@dcdb.it
// Copyright : Leibniz Supercomputing Centre // Copyright : Leibniz Supercomputing Centre
// Description : Template that implements a configurator for Job analyzer plugins. // Description : Template that implements a configurator for Job operator plugins.
//================================================================================ //================================================================================
//================================================================================ //================================================================================
...@@ -25,99 +25,97 @@ ...@@ -25,99 +25,97 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//================================================================================ //================================================================================
#ifndef PROJECT_JOBANALYZERCONFIGURATORTEMPLATE_H #ifndef PROJECT_JOBOPERATORCONFIGURATORTEMPLATE_H
#define PROJECT_JOBANALYZERCONFIGURATORTEMPLATE_H #define PROJECT_JOBOPERATORCONFIGURATORTEMPLATE_H
#include "AnalyzerConfiguratorTemplate.h" #include "OperatorConfiguratorTemplate.h"
#include "JobAnalyzerTemplate.h" #include "JobOperatorTemplate.h"
/** /**
* @brief Template that implements a configurator for Job analyzer plugins. * @brief Template that implements a configurator for Job operator plugins.
* *
* @details This template expands the standard AnalyzerConfiguratorTemplate, * @details This template expands the standard OperatorConfiguratorTemplate,
* with very few changes to accomodate the different design of job * with very few changes to accomodate the different design of job
* analyzers. * operators.
* *
* @ingroup analyzer * @ingroup operator
*/ */
template <class Analyzer, class SBase = SensorBase> template <class Operator, class SBase = SensorBase>
class JobAnalyzerConfiguratorTemplate : virtual public AnalyzerConfiguratorTemplate<Analyzer, SBase> { class JobOperatorConfiguratorTemplate : virtual public OperatorConfiguratorTemplate<Operator, SBase> {
// Verifying the types of input classes // Verifying the types of input classes
static_assert(std::is_base_of<SensorBase, SBase>::value, "SBase must derive from SensorBase!"); static_assert(std::is_base_of<SensorBase, SBase>::value, "SBase must derive from SensorBase!");
static_assert(std::is_base_of<AnalyzerInterface, Analyzer>::value, "Analyzer must derive from AnalyzerInterface!"); static_assert(std::is_base_of<OperatorInterface, Operator>::value, "Operator must derive from OperatorInterface!");
protected: protected:
// For readability // For readability
using A_Ptr = std::shared_ptr<Analyzer>; using O_Ptr = std::shared_ptr<Operator>;
public: public:
/** /**
* @brief Class constructor * @brief Class constructor
*/ */
JobAnalyzerConfiguratorTemplate() : AnalyzerConfiguratorTemplate<Analyzer, SBase>() {} JobOperatorConfiguratorTemplate() : OperatorConfiguratorTemplate<Operator, SBase>() {}
/** /**
* @brief Copy constructor is not available * @brief Copy constructor is not available
*/ */
JobAnalyzerConfiguratorTemplate(const JobAnalyzerConfiguratorTemplate&) = delete; JobOperatorConfiguratorTemplate(const JobOperatorConfiguratorTemplate&) = delete;
/** /**
* @brief Assignment operator is not available * @brief Assignment operator is not available
*/ */
JobAnalyzerConfiguratorTemplate& operator=(const JobAnalyzerConfiguratorTemplate&) = delete; JobOperatorConfiguratorTemplate& operator=(const JobOperatorConfiguratorTemplate&) = delete;
/** /**
* @brief Class destructor * @brief Class destructor
*/ */
virtual ~JobAnalyzerConfiguratorTemplate() {} virtual ~JobOperatorConfiguratorTemplate() {}
protected: protected:
/** /**
* @brief Instantiates all necessary units for a single (job) analyzer * @brief Instantiates all necessary units for a single (job) operator
* *
* When using job analyzers, the only unit that is always instantiated is ALWAYS the template * When using job operators, the only unit that is always instantiated is ALWAYS the template
* unit, similarly to ordinary analyzers in on-demand mode. Such unit then is used at runtime, * unit, similarly to ordinary operators in on-demand mode. Such unit then is used at runtime,
* even in streaming mode, to build dynamically all appropriate units for jobs that are * even in streaming mode, to build dynamically all appropriate units for jobs that are
* currently running in the system. * currently running in the system.
* *
* @param an The analyzer whose units must be created * @param op The operator whose units must be created
* @param protoInputs The vector of prototype input sensors * @param protoInputs The vector of prototype input sensors
* @param protoOutputs The vector of prototype output sensors * @param protoOutputs The vector of prototype output sensors
* @param inputMode Input mode to be used (selective, all or all_recursive) * @param inputMode Input mode to be used (selective, all or all_recursive)
* @return True if successful, false otherwise * @return True if successful, false otherwise
*/ */
virtual bool readUnits(Analyzer& an, std::vector<shared_ptr<SBase>>& protoInputs, std::vector<shared_ptr<SBase>>& protoOutputs, inputMode_t inputMode) { virtual bool readUnits(Operator& op, std::vector<shared_ptr<SBase>>& protoInputs, std::vector<shared_ptr<SBase>>& protoOutputs, inputMode_t inputMode) {
// Forcing the job analyzer to not be duplicated // Forcing the job operator to not be duplicated
an.setDuplicate(false); op.setDuplicate(false);
vector <shared_ptr<UnitTemplate<SBase>>> *units = NULL; vector <shared_ptr<UnitTemplate<SBase>>> *units = NULL;
try { try {
units = this->_unitGen.generateUnits(protoInputs, protoOutputs, inputMode, units = this->_unitGen.generateUnits(protoInputs, protoOutputs, inputMode, op.getMqttPart(), true, op.getRelaxed());
MQTTChecker::formatTopic(this->_mqttPrefix) + MQTTChecker::formatTopic(an.getMqttPart()),
true, an.getRelaxed());
} }
catch (const std::exception &e) { catch (const std::exception &e) {
LOG(error) << this->_analyzerName << " " << an.getName() << ": Error when creating template job unit: " << e.what(); LOG(error) << this->_operatorName << " " << op.getName() << ": Error when creating template job unit: " << e.what();
delete units; delete units;
return false; return false;
} }
if(units->size() > 1) { if(units->size() > 1) {
LOG(error) << this->_analyzerName << " " << an.getName() << ": Invalid job template unit, please check your configuration!"; LOG(error) << this->_operatorName << " " << op.getName() << ": Invalid job template unit, please check your configuration!";
delete units; delete units;
return false; return false;
} }
shared_ptr<UnitTemplate<SBase>> jobUnit = units->at(0); shared_ptr<UnitTemplate<SBase>> jobUnit = units->at(0);
delete units; delete units;
an.clearUnits(); op.clearUnits();
//if(!this->constructSensorTopics(*jobUnit, an)) //if(!this->constructSensorTopics(*jobUnit, op))
// return false; // return false;
if (this->unit(*jobUnit)) { if (this->unit(*jobUnit)) {
an.addToUnitCache(jobUnit); op.addToUnitCache(jobUnit);
LOG(debug) << " Template job unit " + jobUnit->getName() + " generated."; LOG(debug) << " Template job unit " + jobUnit->getName() + " generated.";
} else { } else {
LOG(error) << " Template job unit " << jobUnit->getName() << " did not pass the final check!"; LOG(error) << " Template job unit " << jobUnit->getName() << " did not pass the final check!";
...@@ -130,4 +128,4 @@ protected: ...@@ -130,4 +128,4 @@ protected:
boost::log::sources::severity_logger<boost::log::trivial::severity_level> lg; boost::log::sources::severity_logger<boost::log::trivial::severity_level> lg;
}; };
#endif //PROJECT_JOBANALYZERCONFIGURATORTEMPLATE_H #endif //PROJECT_JOBOPERATORCONFIGURATORTEMPLATE_H
//================================================================================ //================================================================================
// Name : JobAnalyzerTemplate.h // Name : JobOperatorTemplate.h
// Author : Alessio Netti // Author : Alessio Netti
// Contact : info@dcdb.it // Contact : info@dcdb.it
// Copyright : Leibniz Supercomputing Centre // Copyright : Leibniz Supercomputing Centre
// Description : Template implementing features needed by Analyzers. // Description : Template implementing features needed by Operators.
//================================================================================ //================================================================================
//================================================================================ //================================================================================
...@@ -25,22 +25,22 @@ ...@@ -25,22 +25,22 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//================================================================================ //================================================================================
#ifndef PROJECT_JOBANALYZERTEMPLATE_H #ifndef PROJECT_JOBOPERATORTEMPLATE_H
#define PROJECT_JOBANALYZERTEMPLATE_H #define PROJECT_JOBOPERATORTEMPLATE_H
#include "AnalyzerTemplate.h" #include "OperatorTemplate.h"
/** /**
* @brief Template that implements features needed by Job Analyzers and * @brief Template that implements features needed by Job Operators and
* complying to AnalyzerInterface. * complying to OperatorInterface.
* *
* @details This template is derived from AnalyzerTemplate, and is adjusted to * @details This template is derived from OperatorTemplate, and is adjusted to
* simplify job-related computations. * simplify job-related computations.
* *
* @ingroup analyzer * @ingroup operator
*/ */
template <typename S> template <typename S>
class JobAnalyzerTemplate : virtual public AnalyzerTemplate<S> { class JobOperatorTemplate : virtual public OperatorTemplate<S> {
// The template shall only be instantiated for classes which derive from SensorBase // The template shall only be instantiated for classes which derive from SensorBase
static_assert(is_base_of<SensorBase, S>::value, "S must derive from SensorBase!"); static_assert(is_base_of<SensorBase, S>::value, "S must derive from SensorBase!");
...@@ -55,10 +55,10 @@ public: ...@@ -55,10 +55,10 @@ public:
/** /**
* @brief Class constructor * @brief Class constructor
* *
* @param name Name of the analyzer * @param name Name of the operator
*/ */
JobAnalyzerTemplate(const string name) : JobOperatorTemplate(const string name) :
AnalyzerTemplate<S>(name), OperatorTemplate<S>(name),
_jobDataVec(nullptr) { _jobDataVec(nullptr) {
_unitAccess.store(false); _unitAccess.store(false);
...@@ -69,8 +69,8 @@ public: ...@@ -69,8 +69,8 @@ public:
* @brief Copy constructor * @brief Copy constructor
* *
*/ */
JobAnalyzerTemplate(const JobAnalyzerTemplate& other) : JobOperatorTemplate(const JobOperatorTemplate& other) :
AnalyzerTemplate<S>(other), OperatorTemplate<S>(other),
_jobDataVec(nullptr) { _jobDataVec(nullptr) {
_unitAccess.store(false); _unitAccess.store(false);
...@@ -81,8 +81,8 @@ public: ...@@ -81,8 +81,8 @@ public:
* @brief Assignment operator * @brief Assignment operator
* *
*/ */
JobAnalyzerTemplate& operator=(const JobAnalyzerTemplate& other) { JobOperatorTemplate& operator=(const JobOperatorTemplate& other) {
AnalyzerTemplate<S>::operator=(other); OperatorTemplate<S>::operator=(other);
_jobDataVec = nullptr; _jobDataVec = nullptr;
this->_dynamic = true; this->_dynamic = true;
return *this; return *this;
...@@ -91,20 +91,20 @@ public: ...@@ -91,20 +91,20 @@ public:
/** /**
* @brief Class destructor * @brief Class destructor
*/ */
virtual ~JobAnalyzerTemplate() { virtual ~JobOperatorTemplate() {
if(_jobDataVec) if(_jobDataVec)
delete _jobDataVec; delete _jobDataVec;
} }
/** /**
* @brief Returns the units of this analyzer * @brief Returns the units of this operator
* *
* The units returned by this method are of the UnitInterface type. The actual units, in their * The units returned by this method are of the UnitInterface type. The actual units, in their
* derived type, are used internally. This type of analyzer employs dynamic units that are * derived type, are used internally. This type of operator employs dynamic units that are
* generated at runtime: as such, an internal unit lock is acquired upon calling this method, * generated at runtime: as such, an internal unit lock is acquired upon calling this method,
* and must later be released through the releaseUnits() method. * and must later be released through the releaseUnits() method.
* *
* @return The vector of UnitInterface objects of this analyzer * @return The vector of UnitInterface objects of this operator
*/ */
virtual vector<UnitPtr>& getUnits() override { virtual vector<UnitPtr>& getUnits() override {
// Spinlock to regulate access to units - normally innocuous // Spinlock to regulate access to units - normally innocuous
...@@ -122,17 +122,17 @@ public: ...@@ -122,17 +122,17 @@ public:
} }
/** /**
* @brief Initializes this analyzer * @brief Initializes this operator
* *
* @param io Boost ASIO service to be used * @param io Boost ASIO service to be used
*/ */
virtual void init(boost::asio::io_service& io) override { AnalyzerInterface::init(io); } virtual void init(boost::asio::io_service& io) override { OperatorInterface::init(io); }
/** /**
* @brief Performs an on-demand compute task * @brief Performs an on-demand compute task
* *
* Unlike the protected computeAsync and compute methods, computeOnDemand allows to interactively * Unlike the protected computeAsync and compute methods, computeOnDemand allows to interactively
* perform data analytics queries on the analyzer, which must have the _streaming attribute set * perform data analytics queries on the operator, which must have the _streaming attribute set
* to false. A unit is generated on the fly, corresponding to the input node given as input, * to false. A unit is generated on the fly, corresponding to the input node given as input,
* and results are returned in the form of a map. * and results are returned in the form of a map.
* *
...@@ -143,7 +143,7 @@ public: ...@@ -143,7 +143,7 @@ public:
map<string, reading_t> outMap; map<string, reading_t> outMap;
if( !this->_streaming ) { if( !this->_streaming ) {
try { try {
// Getting exclusive access to the analyzer // Getting exclusive access to the operator
while( this->_onDemandLock.exchange(true) ) {} while( this->_onDemandLock.exchange(true) ) {}
uint32_t jobId = MQTTChecker::topicToJob(node); uint32_t jobId = MQTTChecker::topicToJob(node);
if(_jobDataVec) if(_jobDataVec)
...@@ -166,7 +166,7 @@ public: ...@@ -166,7 +166,7 @@ public:
} }
} }
} else } else
throw std::runtime_error("Analyzer " + this->_name + ": cannot retrieve job data!"); throw std::runtime_error("Operator " + this->_name + ": cannot retrieve job data!");
} catch(const exception& e) { } catch(const exception& e) {
this->_onDemandLock.store(false); this->_onDemandLock.store(false);
throw; throw;
...@@ -192,20 +192,20 @@ public: ...@@ -192,20 +192,20 @@ public:
if(!found) if(!found)
throw std::domain_error("Job " + node + " does not belong to the domain of " + this->_name + "!"); throw std::domain_error("Job " + node + " does not belong to the domain of " + this->_name + "!");
} else } else
throw std::runtime_error("Analyzer " + this->_name + ": not available for on-demand query!"); throw std::runtime_error("Operator " + this->_name + ": not available for on-demand query!");
return outMap; return outMap;
} }
protected: protected:
using AnalyzerTemplate<S>::compute; using OperatorTemplate<S>::compute;
/** /**
* @brief Data analytics (job) computation logic * @brief Data analytics (job) computation logic
* *
* This method contains the actual logic used by the analyzed, and is automatically called by * This method contains the actual logic used by the analyzed, and is automatically called by
* the computeAsync method. This variant of the compute() method defined in AnalyzerTemplate also * the computeAsync method. This variant of the compute() method defined in OperatorTemplate also
* includes a job data structure in its list of arguments, and is specialized for job analyzers. * includes a job data structure in its list of arguments, and is specialized for job operators.
* *
* @param unit Shared pointer to unit to be processed * @param unit Shared pointer to unit to be processed
* @param jobData Job data structure * @param jobData Job data structure
...@@ -216,7 +216,7 @@ protected: ...@@ -216,7 +216,7 @@ protected:
* @brief This method encapsulates all logic to generate and manage job units * @brief This method encapsulates all logic to generate and manage job units
* *
* The algorithm implemented in this method is very similar to that used in computeOnDemand in * The algorithm implemented in this method is very similar to that used in computeOnDemand in
* AnalyzerTemplate, and it is used to manage job units both in on-demand and streaming mode. The * OperatorTemplate, and it is used to manage job units both in on-demand and streaming mode. The
* internal unit cache is used to store recent job units. Moreover, the job data returned by the * internal unit cache is used to store recent job units. Moreover, the job data returned by the
* QueryEngine is converted to a format compatible with the UnitGenerator. * QueryEngine is converted to a format compatible with the UnitGenerator.
* *
...@@ -227,18 +227,18 @@ protected: ...@@ -227,18 +227,18 @@ protected:
string jobTopic = MQTTChecker::jobToTopic(jobData.jobId); string jobTopic = MQTTChecker::jobToTopic(jobData.jobId);
U_Ptr jobUnit = nullptr; U_Ptr jobUnit = nullptr;
if(!this->_unitCache)