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

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

Github user mmiklavc commented on the issue:

    https://github.com/apache/metron/pull/1213
  
    @merrimanr - I think I viewed the choice of ParserRunner implementation as 
a strategy of sorts. I guess I don't care either way. @nickwallen's suggestion 
of making that an interface, that I see you've implemented, should work well 
there also. There's definitely some impedance mismatch between what's in 
parsers vs enrichment, so there won't be a direct mapping of concepts.
    
    @nickwallen - I've been going back and forth about which approach to take 
in handling success/errors. I think I agree with you and prefer keeping the 
runner interface simpler by simply returning a `List<SomethingResulty>`. The 
fact that we have to jump through hoops a bit for callbacks because of needing 
reference to the Tuple in onSuccess suggests to me that it's probably better to 
manage the results in a returned list. The validation on the runner is also 
simpler in this case as well, ie no need to validate you've set your callbacks. 
Having onSucess/Error methods in the runner interface feels a little fishy to 
me. I also think that it makes some sense to decouple the parsing phase from 
writing altogether, though I recognize that callbacks are not opinionated about 
the "what" that happens in success/error would be.


> 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