Github user cestella commented on a diff in the pull request:
https://github.com/apache/incubator-metron/pull/129#discussion_r64564714
--- Diff:
metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/bolt/ParserBolt.java
---
@@ -59,10 +61,22 @@ public ParserBolt
withMessageFilter(MessageFilter<JSONObject> filter) {
public void prepare(Map stormConf, TopologyContext context,
OutputCollector collector) {
super.prepare(stormConf, context, collector);
this.collector = collector;
+ if(getSensorParserConfig() == null) {
+ filter = new GenericMessageFilter(null);
+ }
+ else if(filter == null) {
+ filter = Filters.get(getSensorParserConfig().getFilterClassName()
+ , getSensorParserConfig().getParserConfig()
+ );
+ }
parser.init();
writer.init();
}
+ protected SensorParserConfig getSensorParserConfig() {
--- End diff --
When I went to change it, I realized why I put it in the ParserBolt rather
than the ConfiguredParserBolt. The sensorType is part of the ParserBolt rather
than the ConfiguredParserBolt. I am going to make them both part of
ConfiguredParserBolt.
---
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.
---