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

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

GitHub user mattf-horton opened a pull request:

    https://github.com/apache/incubator-metron/pull/345

    METRON-532 Define Profile Period When Calling PROFILE_GET

    This PR builds on top of @nickwallen 's work in METRON-529, which has 
already been committed to master.  It adds an optional argument to PROFILE_GET, 
allowing run-time overrides of the profiler client global configuration 
parameters.  The primary use case is when historical profiles have been created 
with a different profile configuration than is currently configured, and the 
analyst needing to access them does not want to change the global client 
configuration so as not to disrupt the work of other analysts working with 
current profiles.
    
    The proposed placement of the optional Map argument is before the group 
sequence, so as not to disrupt the current usage of a variable-length sequence 
of 'group' arguments.  Example:
    ```
    // Retrieve all values for 'entity1' from 'profile1' that occurred on 
'weekdays' over the past month,
    // overriding the usual global client configuration parameters for window 
duration.
    PROFILE_GET('profile1', 'entity1', 1, 'MONTHS', 
{'profiler.client.period.duration' : '2', 
'profiler.client.period.duration.units' : 'MINUTES'}, 'weekdays')
    ```
    
    An alternative would be to change the 'groups' argument into a List, rather 
than a variable-length sequence of Strings, then put the config_override Map 
after the groups List.  Let me know if you think this would be a better 
implementation, as I can change it very quickly.  Of course the original usage 
would be retained for backward compatibility, but perhaps deprecated.
    
    Testing:  This change is restricted to the Stellar function implementation, 
so the expanded junit test is largely sufficient.  Also, a previous version of 
this code passed Travis in a preview PR against Nick's work branch.

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

    $ git pull https://github.com/mattf-horton/incubator-metron METRON-532

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

    https://github.com/apache/incubator-metron/pull/345.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 #345
    
----
commit 3b6185f16db3e18f30f3e1c1eac1ca5cb69c8803
Author: mattf-horton <[email protected]>
Date:   2016-11-06T19:44:49Z

    METRON-532 Define Profile Period When Calling PROFILE_GET

----


> Define Profile Period When Calling PROFILE_GET
> ----------------------------------------------
>
>                 Key: METRON-532
>                 URL: https://issues.apache.org/jira/browse/METRON-532
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Nick Allen
>            Assignee: Matt Foley
>
> The Profiler Client currently offers the PROFILE_GET Stellar function to 
> access profile data.  The work done for METRON-529 allowed the user to 
> customize the profile period using Metron global properties.  
> A user may need to access historical profiles with different durations and 
> would want to specify the period as part of the call to the Profiler Client, 
> rather than in the Metron global properties.
> This would be especially necessary should METRON-530 be completed allowing 
> different profiles to use different period durations simultaneously.
> There is some discussion of this attached to METRON-529.



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

Reply via email to