use of org.openkilda.wfm.topology.FlowCookieException in project open-kilda by telstra.
the class FlowMetricGenBolt method warmCookieMap.
/**
* Pre-Populate the cookieMap from Neo4J
*/
@SuppressWarnings("unchecked")
private void warmCookieMap() {
Iterator<Map<String, Object>> result;
try {
result = cypher.query(GET_ALL_FLOWS, null);
} catch (ClientException e) {
LOGGER.error("Error warming cookieMap", e);
return;
}
while (result.hasNext()) {
Map<String, Object> row = result.next();
FlowResult flow;
try {
flow = new FlowResult(row);
cookieMap.put(flow.getCookie(), flow);
LOGGER.debug("added entry to cookieMap: {}", flow.toString());
} catch (FlowCookieException e) {
LOGGER.error("error processing cookie", e);
}
}
}
Aggregations