Github user merrimanr commented on a diff in the pull request:
    --- Diff: 
    @@ -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'll be honest, the Java 8 defaults weren't obvious to me either until I 
looked closer at the MessageParser interface :)
    All this synchronization talk makes me nervous.  Would it make things 
simpler if we detected the config change in ParserBolt.execute and 
re-initialized the grok object from there?  We could save a cached copy of the 
config in the ParserBolt on each call to execute and detect changes before 
parse is called using the hashing approach you suggested earlier.  This is the 
reason I initially changed the interface parse method to include the most 
recent config, to avoid multi-threading complexity.  This is approach is very 
similar, we're just using a different method to pass this config in and 
detecting a change in ParserBolt instead of GrokParser.  The parse method is 
synchronous by nature anyways.  It doesn't need to be aware of a config change 
immediately, only when the parse method is called.

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 or file a JIRA ticket
with INFRA.

Reply via email to