[
https://issues.apache.org/jira/browse/METRON-625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15749597#comment-15749597
]
ASF GitHub Bot commented on METRON-625:
---------------------------------------
Github user ottobackwards commented on a diff in the pull request:
https://github.com/apache/incubator-metron/pull/396#discussion_r92497084
--- Diff:
metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/bolt/ParserBolt.java
---
@@ -76,12 +77,15 @@ public void prepare(Map stormConf, TopologyContext
context, OutputCollector coll
if(getSensorParserConfig() == null) {
filter = new GenericMessageFilter();
}
- else if(filter == null) {
+ if(filter == null) {
getSensorParserConfig().getParserConfig().putIfAbsent("stellarContext",
stellarContext);
- filter = Filters.get(getSensorParserConfig().getFilterClassName()
- , getSensorParserConfig().getParserConfig()
- );
+
if(!StringUtils.isEmpty(getSensorParserConfig().getFilterClassName())) {
--- End diff --
If it is null, don't we want to put in the GenericMessageFilter() as well?
> Parser Filters cannot be specified from the sensor config
> ---------------------------------------------------------
>
> Key: METRON-625
> URL: https://issues.apache.org/jira/browse/METRON-625
> Project: Metron
> Issue Type: Bug
> Reporter: Casey Stella
> Assignee: Casey Stella
>
> Parser filters cannot be specified because of a logic error in the prepare
> for the ParserBolt. Specifically, we are loading the filter from the config
> only if the filter member variable is null. Unfortunately, this will never
> be null, because it is initialized to a default implementation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)