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.
---