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

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

Github user nickwallen commented on the issue:

    https://github.com/apache/incubator-metron/pull/387
  
    I had hit the first two, but not the last.  I just setup an additional 
manual test that covers all of these scenarios.  More specifically, here are 
the profiles that I defined.  
    
    ```
    {
      "profiles": [
        {
          "profile": "counter",
          "foreach": "'global'",
          "init":  { "s": 0 },
          "update":  { "s": "s + 1" },
          "result":  "s"
        },
        {
          "profile": "by-ip",
          "foreach": "ip_src_addr",
          "init":  { "s": 0 },
          "update":  { "s": "s + 1" },
          "result":  "s"
        },
        {
          "profile": "always-zero",
          "foreach": "ip_src_addr",
          "init":  { "s": 0 },
          "update":  { "s": 0 },
          "result":  "s"
        }
      ]
    }
    ```
    
    One of the profiles counts messages that it sees "globally", the next 
counts the number of messages by source IP, and the last likes to always 
zero-out the same variable named "s", just to see if it can muck with the other 
two profiles.  
    
    The `always-zero` profile as expected remains 0.  I can see additional 
values being written as time progresses.
    ```
    [Stellar]>>> PROFILE_GET("always-zero","72.34.49.86", 5, "MINUTES")
    [0, 0]
    [Stellar]>>> PROFILE_GET("always-zero","72.34.49.86", 5, "MINUTES")
    [0, 0, 0]
    ```
    
    All of these profiles share the same variable 's', so if there was some 
kind of bad intermingling, I would expect the `always-zero` profile to 
seriously muck things up for the other two profiles.  But I do not see any of 
that.  
    
    I can see new values being added to the `by-ip` profile.
    ```
    [Stellar]>>> PROFILE_GET("by-ip","72.34.49.86", 5, "MINUTES")
    [10.0, 106.0]
    [Stellar]>>> PROFILE_GET("by-ip","72.34.49.86", 5, "MINUTES")
    [10.0, 106.0, 58.0]
    
    [Stellar]>>> PROFILE_GET("by-ip","192.168.138.158", 5, "MINUTES")
    [296.0, 303.0, 302.0]
    [Stellar]>>> PROFILE_GET("by-ip","192.168.138.158", 7, "MINUTES")
    [296.0, 303.0, 302.0, 303.0]
    ```
    
    The "global" profile is also behaving properly.
    ```
    [Stellar]>>> PROFILE_GET("counter","global", 5, "MINUTES")
    [833.0, 319.0, 746.0]
    [Stellar]>>> PROFILE_GET("counter","global", 6, "MINUTES")
    [833.0, 319.0, 746.0, 1538.0]
    ```



> Profiler Overwriting Previously Written Values
> ----------------------------------------------
>
>                 Key: METRON-606
>                 URL: https://issues.apache.org/jira/browse/METRON-606
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Nick Allen
>            Assignee: Nick Allen
>
> The Profiler is repetitively overwriting previously written values.  Where I 
> would expect to see a series of multiple values in Hbase, one written per 
> flush, there is only a single value.  This same value is being repetitively 
> overwritten with new data. 
> This is occurring because the same ProfileMeasurement is being re-used after 
> a flush event.  Prior to METRON-575, a new ProfileMeasurement was created 
> after a flush event.  Without the new ProfileMeasurement, the timestamp used 
> to generate the row key remains the same.
> Drat.



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

Reply via email to