Github user merrimanr commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/129#discussion_r64405009
  
    --- Diff: 
metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/bolt/ParserBolt.java
 ---
    @@ -59,10 +61,22 @@ public ParserBolt 
withMessageFilter(MessageFilter<JSONObject> filter) {
       public void prepare(Map stormConf, TopologyContext context, 
OutputCollector collector) {
         super.prepare(stormConf, context, collector);
         this.collector = collector;
    +    if(getSensorParserConfig() == null) {
    +      filter = new GenericMessageFilter(null);
    +    }
    +    else if(filter == null) {
    +      filter = Filters.get(getSensorParserConfig().getFilterClassName()
    +              , getSensorParserConfig().getParserConfig()
    +      );
    +    }
         parser.init();
         writer.init();
       }
     
    +  protected SensorParserConfig getSensorParserConfig() {
    --- End diff --
    
    Would it make more sense to move this to the ConfiguredParserBolt class?  
Don't think it matters much now because ParserBolt is the only class that 
extends ConfiguredParserBolt but other bolts may be created in the future and 
it would be nice to have this method available.


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

Reply via email to