[ 
https://issues.apache.org/jira/browse/METRON-1681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16630711#comment-16630711
 ] 

ASF GitHub Bot commented on METRON-1681:
----------------------------------------

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

    https://github.com/apache/metron/pull/1213#discussion_r220994410
  
    --- Diff: 
metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/topology/ParserTopologyBuilder.java
 ---
    @@ -268,29 +266,14 @@ private static ParserBolt createParserBolt( String 
zookeeperUrl,
                                                   Optional<String> 
securityProtocol,
                                                   ParserConfigurations configs,
                                                   Optional<String> 
outputTopic) {
    -
    -    Map<String, ParserComponents> parserBoltConfigs = new HashMap<>();
    +    Map<String, WriterHandler> writerConfigs = new HashMap<>();
         for( Entry<String, SensorParserConfig> entry : 
sensorTypeToParserConfig.entrySet()) {
           String sensorType = entry.getKey();
           SensorParserConfig parserConfig = entry.getValue();
    -      // create message parser
    --- End diff --
    
    This should not be done here because it can potentially cause serialization 
problems:  https://issues.apache.org/jira/browse/METRON-1793.  MessageParser 
and MessageFilter objects should be created during initialization and not when 
the container is created (and before the ParserBolt is created).  We should be 
doing this when prepare is called on the ParserBolt.


> Decouple the ParserBolt from the Parse execution logic
> ------------------------------------------------------
>
>                 Key: METRON-1681
>                 URL: https://issues.apache.org/jira/browse/METRON-1681
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Justin Leet
>            Priority: Major
>
> Per discussion on https://github.com/apache/metron/pull/1099, there are 
> concerns about the ParserBolt needed some refactoring.  The discussion didn't 
> hold the PR up, but it was generally agreed that we should decouple some of 
> the initialization and execution logic.
> This also aids us in integrating with other systems such as NiFi or Spark.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to