Github user cestella commented on a diff in the pull request:
https://github.com/apache/incubator-metron/pull/453#discussion_r100801585
--- Diff:
metron-platform/metron-writer/src/main/java/org/apache/metron/writer/bolt/BulkMessageWriterBolt.java
---
@@ -74,7 +81,11 @@ public void prepare(Map stormConf, TopologyContext
context, OutputCollector coll
this.writerComponent = new BulkWriterComponent<>(collector);
this.collector = collector;
super.prepare(stormConf, context, collector);
- messageGetter = MessageGetters.valueOf(messageGetterStr);
+ if
(messageGetStrategyType.equals(MessageGetters.JSON_FROM_FIELD.name()) &&
messageGetField != null) {
--- End diff --
Now that I think about it, you might want to change the `arg` to `String`
from `Object` and either:
* insist that the implementing `MessageGetter`'s provide an appropriate
constructor
* convert in the enum (e.g. `arg ->
BytesFromPosition(ConversionUtils.convert(arg, Integer.class)`)
---
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 [email protected] or file a JIRA ticket
with INFRA.
---