[
https://issues.apache.org/jira/browse/METRON-1681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644073#comment-16644073
]
ASF GitHub Bot commented on METRON-1681:
----------------------------------------
Github user mmiklavc commented on a diff in the pull request:
https://github.com/apache/metron/pull/1213#discussion_r223857790
--- Diff:
metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/bolt/ParserBolt.java
---
@@ -251,8 +249,21 @@ public void execute(Tuple tuple) {
, sensorParserConfig.getReadMetadata()
, sensorParserConfig.getRawMessageStrategyConfig()
);
- parserRunner.setOnSuccess(parserResult -> onSuccess(parserResult,
tuple));
- parserRunner.execute(sensorType, rawMessage, parserConfigurations);
+ List<ParserResult> parserResults = parserRunner.execute(sensorType,
rawMessage, parserConfigurations);
+ int numWritten = 0;
+ for(ParserResult parserResult: parserResults) {
--- End diff --
Thanks for this Ryan, I do think it's easier to follow.
> 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)