Commit bff42db0 authored by Michael Ott's avatar Michael Ott
Browse files

Initialize QueryEngine in CollectAgent, minor fixes for compilation issues.

parent 0fb2250a
......@@ -40,7 +40,6 @@ install: install_operator
@echo " > make install_conf"
operators/%.o: CXXFLAGS+= $(PLUGINFLAGS)
../common/src/sensornavigator.o: CXXFLAGS+= $(PLUGINFLAGS)
libdcdboperator_aggregator.$(LIBEXT): operators/aggregator/AggregatorOperator.o operators/aggregator/AggregatorConfigurator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
......
......@@ -83,7 +83,7 @@ bool ClusteringConfigurator::readUnits(ClusteringOperator& op, std::vector<Clust
}
shared_ptr<UnitTemplate<ClusteringSensorBase>> un = nullptr;
try {
un = _unitGen.generateHierarchicalUnit(SensorNavigator::rootKey, std::list<std::string>(), protoGlobalOutputs, protoInputs,
un = _unitGen.generateHierarchicalUnit(_sensorNavigator->rootKey, std::list<std::string>(), protoGlobalOutputs, protoInputs,
protoOutputs, inputMode, op.getMqttPart(), !op.getStreaming(), op.getEnforceTopics(), op.getRelaxed());
}
catch (const std::exception &e) {
......
......@@ -27,6 +27,8 @@
#include "analyticscontroller.h"
SensorNavigator* _sensorNavigator;
void AnalyticsController::start() {
_keepRunning = true;
_readingCtr = 0;
......
......@@ -772,9 +772,7 @@ int main(int argc, char* const argv[]) {
boost::asio::io_context io;
boost::thread_group threads;
analyticsController = new AnalyticsController(mySensorConfig, mySensorDataStore, io);
analyticsController->setCache(&mySensorCache);
analyticsController->setMetadataStore(metadataStore);
_queryEngine = new QueryEngine;
_queryEngine->setFilter(analyticsSettings.filter);
_queryEngine->setJobFilter(analyticsSettings.jobFilter);
_queryEngine->setJobMatch(analyticsSettings.jobMatch);
......@@ -785,6 +783,10 @@ int main(int argc, char* const argv[]) {
_queryEngine->setGroupQueryCallback(sensorGroupQueryCallback);
_queryEngine->setMetadataQueryCallback(metadataQueryCallback);
_queryEngine->setJobQueryCallback(jobQueryCallback);
analyticsController = new AnalyticsController(mySensorConfig, mySensorDataStore, io);
analyticsController->setCache(&mySensorCache);
analyticsController->setMetadataStore(metadataStore);
if(!analyticsController->initialize(settings))
return EXIT_FAILURE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment