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

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to