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

    https://github.com/apache/metron/pull/1213#discussion_r222735970
  
    --- Diff: 
metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/bolt/ParserBolt.java
 ---
    @@ -185,37 +199,12 @@ public void prepare(Map stormConf, TopologyContext 
context, OutputCollector coll
         super.prepare(stormConf, context, collector);
         messageGetStrategy = MessageGetters.DEFAULT_BYTES_FROM_POSITION.get();
         this.collector = collector;
    -
    -    // Build the Stellar cache
    -    Map<String, Object> cacheConfig = new HashMap<>();
    -    for (Map.Entry<String, ParserComponents> entry: 
sensorToComponentMap.entrySet()) {
    -      String sensor = entry.getKey();
    -      SensorParserConfig config = getSensorParserConfig(sensor);
    -
    -      if (config != null) {
    -        cacheConfig.putAll(config.getCacheConfig());
    -      }
    -    }
    -    cache = CachingStellarProcessor.createCache(cacheConfig);
    +    this.parserRunner.setOnError(this::onError);
    --- End diff --
    
    Seems like success/error functions should go in init() if we went this 
route. I think it's best to choose 1 approach or the other when managing 
initialization and state validation for an object.


---

Reply via email to