Github user mattf-horton commented on a diff in the pull request: https://github.com/apache/incubator-metron/pull/308#discussion_r83381517 --- Diff: metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/interfaces/MessageParser.java --- @@ -34,15 +34,15 @@ * @param rawMessage * @return If null is returned, this is treated as an empty list. */ - List<T> parse(byte[] rawMessage); + List<T> parse(byte[] rawMessage, SensorParserConfig sensorParserConfig); --- End diff -- I really like this idea architecturally, if it is assured that the call to configure() only happens between messages and not asynchronously during a parse. If so, ParserBolt can call a parser-specific routine "parser.checkParserConfigForChange(parserConfig)" to see if the changes are of interest to the particular parser being run, which would be cheaper than checking for ANY changes in the whole config. If the answer is yes, a call to parser.configure() is exactly what the current patch does. But we only want to do this for parsers that care about config, so maybe we should distinguish between MessageParsers and ConfiguredMessageParsers, and do the check in ParserBolt only for ConfiguredMessageParsers. Otherwise, I did figure out how to give GrokParser access to the cached value of grokPattern in a clean and efficient way. But I like @nickwallen 's idea more, if we can agree on it.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---