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

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

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

    https://github.com/apache/metron/pull/1213#discussion_r224755060
  
    --- Diff: 
metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/ParserRunnerImpl.java
 ---
    @@ -137,11 +208,29 @@ private void 
initializeParsers(Supplier<ParserConfigurations> parserConfigSuppli
         }
       }
     
    +  /**
    +   * Post-processes parsed messages by:
    +   * <ul>
    +   *   <li>Applying field transformations defined in the sensor parser 
config</li>
    +   *   <li>Filtering messages using the configured MessageFilter class</li>
    +   *   <li>Validating messages using the MessageParser validate method</li>
    +   * </ul>
    +   * If a message is successfully processed a message is returned in a 
ProcessResult.  If a message fails
    +   * validation, a MetronError object is created and returned in a 
ProcessResult.  If a message is
    +   * filtered out an empty Optional is returned.
    +   *
    +   * @param sensorType Sensor type of the message
    +   * @param message Message parsed by the MessageParser
    +   * @param rawMessage Raw message including metadata
    +   * @param parser MessageParser for the sensor type
    +   * @param parserConfigurations Parser configurations
    +   */
       @SuppressWarnings("unchecked")
    -  protected Optional<ParserResult> processMessage(String sensorType, 
JSONObject message, RawMessage rawMessage,
    +  protected Optional<ProcessResult> processMessage(String sensorType, 
JSONObject message, RawMessage rawMessage,
                                                       
MessageParser<JSONObject> parser,
    --- End diff --
    
    ignore the thing about Multiline... I'm mixing up PR's


> 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