You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/08/18 17:47:01 UTC

[jira] [Commented] (METRON-1121) Ignore Profile with Bad 'init', 'update' or 'groupBy'

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

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

GitHub user nickwallen opened a pull request:

    https://github.com/apache/metron/pull/707

    METRON-1121 Ignore Profile with Bad 'init', 'update' or 'groupBy'

    The Profiler needs to gracefully ignore profiles that have a bad 'init', 'update', or 'groupBy' expression.  Under certain conditions a message may not be applied to all valid profiles, due to a single bad profile.
    
    If the Profiler is running with multiple profiles defined and one of those profiles has a Stellar expression that throws an exception for either the  'init', 'update', or 'groupBy', the current logic will not continue to attempt to apply the message to the remaining valid profiles.  Only valid profiles executed before the bad profile will have the message applied.
    
    ## Testing
    
    Unit tests have been added to check for these conditions.  This can be manually tested with either a live Profiler running in a cluster or using the Profiler debugging functions.  
    
    Create two profiles; one that is valid and another that is invalid, like the following.  Ensure that all test messages that are sent through the Profiler, reach the `good-profile` despite the `bad-profile`.
    
    ```
     {
       "profiles": [
          {
            "profile": "bad-profile",
            "foreach": "ip_src_addr",
            "init":   { "x": "2 / 0" },
            "update": { "x": "x + 1" },
            "result": "x"
          },
          {
            "profile": "good-profile",
            "foreach": "ip_src_addr",
            "init":   { "x": "0" },
            "update": { "x": "x + 1" },
            "result": "x"
          }
       ]
     }
    ```
    
    ## Pull Request Checklist
    
    - [x] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). 
    - [x] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    - [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    - [x] Have you included steps to reproduce the behavior or problem that is being changed or addressed?
    - [x] Have you included steps or a guide to how the change may be verified and tested manually?
    - [x] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
    - [x] Have you written or updated unit tests and or integration tests to verify your changes?
    - [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [x] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?
    - [x] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`:


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nickwallen/metron METRON-1121

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/metron/pull/707.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #707
    
----
commit 5579748ad4336a7c1a15c319d59fd6cbdeb6531e
Author: Nick Allen <ni...@nickallen.org>
Date:   2017-08-18T17:37:01Z

    METRON-1121 Ignore Profile with Bad 'init', 'update' or 'groupBy'

commit 893b7db84f155ea6af975ee51338f39b763eaedb
Author: Nick Allen <ni...@nickallen.org>
Date:   2017-08-18T17:45:50Z

    Rm errant comment

----


> Ignore Profile with Bad 'init', 'update' or 'groupBy'
> -----------------------------------------------------
>
>                 Key: METRON-1121
>                 URL: https://issues.apache.org/jira/browse/METRON-1121
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Nick Allen
>            Assignee: Nick Allen
>
> The Profiler needs to gracefully ignore profiles that have a bad 'init', 'update' or 'groupBy' expression.  Under certain conditions a message may not be applied to all valid profiles, due to a single bad profile.
> If the Profiler is running with multiple profiles defined and one of those profiles has a Stellar expression that throws an exception for either the 'init', 'update' or 'groupBy', the current logic will not continue to attempt to apply the message to the remaining valid profiles.  Only valid profiles executed before the bad profile will have the message applied.  Any valid profiles after the bad profile will not see the message.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)