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-396) Make Stellar function resolution happen via an annotation and classpath search
Date Tue, 06 Sep 2016 16:00:21 GMT

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

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

Github user nickwallen commented on the issue:

    https://github.com/apache/incubator-metron/pull/233
  
    I have been tracing an issue caused by static initialization.  I have a Stellar function
that uses values within the Context to perform initialization.  I have multiple tests in the
same class; test1(), test2(), etc.  In each of these tests, I need to initialize the function
with different values in the Context.  
    
    If I run each test individually, everything works just fine, but if I run all the tests
together the tests fail. The problem is that the functions don't actually re-initialize in
test2() after they have already been initialized in test1().  
    
    I think I need a way to manually clear the functions cached in `FunctionResolverSingleton._getFunctions()`
that I would call before running each unit test.  


> Make Stellar function resolution happen via an annotation and classpath search
> ------------------------------------------------------------------------------
>
>                 Key: METRON-396
>                 URL: https://issues.apache.org/jira/browse/METRON-396
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Casey Stella
>            Assignee: Casey Stella
>              Labels: stellar
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> At the moment, the only way to add a stellar function is to implement StellarFunction
and add the instance to the StellarFunctions enum.  This is deficient in a few ways:
> * It requires you to modify Metron code to add a stellar capability
> * It requires you to make metron-common depend on your project
> * There is no way to enforce documentation of the function
> Instead, we should create an annotation which will define the name, namespace, description,
parameters and returns.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message