Github user cestella commented on a diff in the pull request: https://github.com/apache/incubator-metron/pull/127#discussion_r64669063 --- Diff: metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/bolt/ParserBolt.java --- @@ -60,7 +93,25 @@ public void prepare(Map stormConf, TopologyContext context, OutputCollector coll super.prepare(stormConf, context, collector); this.collector = collector; parser.init(); - writer.init(); + + if(isBulk) { + writerTransformer = config -> new ParserWriterConfiguration(config); --- End diff -- The config object can change if zookeeper is updated, so we want an indirection here. On Wed, May 25, 2016 at 19:11 merrimanr <notificati...@github.com> wrote: > In > metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/bolt/ParserBolt.java > <https://github.com/apache/incubator-metron/pull/127#discussion_r64668872> > : > > > @@ -60,7 +93,25 @@ public void prepare(Map stormConf, TopologyContext context, OutputCollector coll > > super.prepare(stormConf, context, collector); > > this.collector = collector; > > parser.init(); > > - writer.init(); > > + > > + if(isBulk) { > > + writerTransformer = config -> new ParserWriterConfiguration(config); > > Curious why a Function is used here. Why not just instantiate a > WriterConfiguration object for each case and pass that to > messageWriter.init? Is there a benefit to doing it this way? > > â > You are receiving this because you authored the thread. > Reply to this email directly or view it on GitHub > <https://github.com/apache/incubator-metron/pull/127/files/e448abd8cccf6f912095474f034668198e58f442#r64668872> >
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---