Github user mmiklavc commented on a diff in the pull request:
https://github.com/apache/metron/pull/1209#discussion_r220410471
--- Diff:
metron-analytics/metron-profiler-spark/src/main/java/org/apache/metron/profiler/spark/function/MessageRouterFunction.java
---
@@ -80,19 +100,54 @@ public MessageRouterFunction(ProfilerConfig
profilerConfig, Map<String, String>
Optional<JSONObject> message = toMessage(jsonMessage, parser);
if(message.isPresent()) {
- // find all routes
- routes = router.route(message.get(), profilerConfig, context);
- LOG.trace("Found {} route(s) for a message", routes.size());
+ // extract the timestamp from the message
+ Clock clock = clockFactory.createClock(profilerConfig);
--- End diff --
See comments in the clock factory class regarding cached instance.
---