metron-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (METRON-1681) Decouple the ParserBolt from the Parse execution logic
Date Thu, 04 Oct 2018 16:17:00 GMT

    [ https://issues.apache.org/jira/browse/METRON-1681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16638455#comment-16638455
] 

ASF GitHub Bot commented on METRON-1681:
----------------------------------------

Github user mmiklavc commented on a diff in the pull request:

    https://github.com/apache/metron/pull/1213#discussion_r222735970
  
    --- Diff: metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/bolt/ParserBolt.java
---
    @@ -185,37 +199,12 @@ public void prepare(Map stormConf, TopologyContext context, OutputCollector
coll
         super.prepare(stormConf, context, collector);
         messageGetStrategy = MessageGetters.DEFAULT_BYTES_FROM_POSITION.get();
         this.collector = collector;
    -
    -    // Build the Stellar cache
    -    Map<String, Object> cacheConfig = new HashMap<>();
    -    for (Map.Entry<String, ParserComponents> entry: sensorToComponentMap.entrySet())
{
    -      String sensor = entry.getKey();
    -      SensorParserConfig config = getSensorParserConfig(sensor);
    -
    -      if (config != null) {
    -        cacheConfig.putAll(config.getCacheConfig());
    -      }
    -    }
    -    cache = CachingStellarProcessor.createCache(cacheConfig);
    +    this.parserRunner.setOnError(this::onError);
    --- End diff --
    
    Seems like success/error functions should go in init() if we went this route. I think
it's best to choose 1 approach or the other when managing initialization and state validation
for an object.


> Decouple the ParserBolt from the Parse execution logic
> ------------------------------------------------------
>
>                 Key: METRON-1681
>                 URL: https://issues.apache.org/jira/browse/METRON-1681
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Justin Leet
>            Priority: Major
>
> Per discussion on https://github.com/apache/metron/pull/1099, there are concerns about
the ParserBolt needed some refactoring.  The discussion didn't hold the PR up, but it was
generally agreed that we should decouple some of the initialization and execution logic.
> This also aids us in integrating with other systems such as NiFi or Spark.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message