...
In the dashboard-networkdb-repopulator/src/main/java/net/dante/dashboard/population/messaging/Consumer.java the Consumer picks up a message from the ESB, previously created by the OpsDB-Copier Application
The main classes used are:
net.dante.dashboard.population.messaging.Consumer.class
net.dante.dashboard.population.messaging.Producer.class
net.dante.dashboard.population.notification.NotificationPersistor.class
net.dante.dashboard.population.notification.NotificationPersistorImpl.class
net.dante.dashboard.population.routers.RouterQueryRepopulator.class
net.dante.dashboard.population.tar.TarUnpacker.class
The configuration files are found in the classpath of the application. /var/lib/apache-tomcat7/webapps/populate-web/WEB-INF/classes
public synchronized void receiveRepopulateRequest(ActiveMQMessage message) throws ExecutionException, InterruptedException {
LOG.info("Received request to repopulate network map DB....");
try {
attemptNetworkMapDatabaseRepopulation();
updateNotifications();
producer.notifyCorrelatorMapRepopulated();
} catch (Exception exception) {
handleExceptionAtHighLevel(exception);
} finally {
producer.sendNotificationsReload();
}
}
...
The Producer sends a message to the networkMapReloadQueue and the notificationsReloadQueue which causes the NetworkMap to be switched.
Within the attemptNetworkMapDatabaseRepopulation function, the following functions are called:
tarUnpacker.execute(); - net net.dante.dashboard.population.tar.TarUnpacker - Found in dashboard-networkdb-repopulator
opsDbImporter.importDump(); - net net.dante.dashboard.data.importAndExport.DatabaseImporter - Found in dashboard-common
populator.repopulate(); - net net.dante.dashboard.populate.Populator - Found in dashboard-network-map <> populate-model
routerQueryRepopulator.executeRouterQueries(); - net net.dante.dashboard.population.routers.RouterQueryRepopulator;- Found in dashboard-networkdb-repopulator
populator.repopulate()
Sadly the first thing it does is wipe out all the data in the networkmap schema using the net.dante.dashboard.populate.NetworkMapWiper class then it calls the populateDataBase() function.
routerQueryRepopulator.executeRouterQueries()
...