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

ASF GitHub Bot commented on QUARKS-78:
--------------------------------------

GitHub user dlaboss opened a pull request:

    https://github.com/apache/incubator-quarks/pull/48

    [QUARKS-78] [WIP] Range analytic utility

    - promote samples.apps.Range to quarks.analytics.sensors
    - see Range javadoc for Guava Range issues and such

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

    $ git pull https://github.com/dlaboss/incubator-quarks quarks-78-range

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

    https://github.com/apache/incubator-quarks/pull/48.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 #48
    
----
commit cc4476a3fce86833cbcf84f87ede6f3b29a11d5b
Author: Dale LaBossiere <[email protected]>
Date:   2016-03-25T19:20:59Z

    [QUARKS-78] [WIP] Range analytic utility
    
    - promote samples.apps.Range to quarks.analytics.sensors
    - see Range javadoc for Guava Range issues and such

----


> Add Range analytic utility?
> ---------------------------
>
>                 Key: QUARKS-78
>                 URL: https://issues.apache.org/jira/browse/QUARKS-78
>             Project: Quarks
>          Issue Type: New Feature
>          Components: Analytics
>            Reporter: Dale LaBossiere
>            Assignee: Dale LaBossiere
>              Labels: newbie
>
> A common sensor analytic is to filter for values being within, or outside of, 
> a range. It's common for range values to be initialized from static 
> properties files and/or dynamically set from external sources. 
> e.g., a Range could be used for the band region of a deadband filter. 
> ```
> Range<Integer> r = Range.closedOpen(3,7); // Integer range between 
> 3-inclusive and 7-exclusive 
> r = Range.valueOf("[3..7)", Integer.class); // same thing 
> s = s.filter(tuple -> !r.contains(tuple)); // pass only tuples outside the 
> range
> // Range is generic type. 
> // There are the full combination of two bound range ctors and 
> // ctors for those with only a single bound, e.g., Range.atMost(7) // 
> (-INF..7] ``` 
> The Guava Range class offers a very convenient way for dealing with ranges. 
> The Guava jar is significant in size. There are ways to mitigate that using 
> ProGuard though it's not clear that approach would be appropriate for 
> quarks/library use. See 
> https://github.com/google/guava/wiki/UsingProGuardWithGuava 
> The SensorAnalytics sample app added a very simple and lightweight Range 
> implementation of a portion of the Guava Range API. Should that be 
> incorporated into quarks.analytics.sensors to "make the simple simple"? 
> [~djd] suggests that instead of using that Range impl, the actual Guava Range 
> implementation be incorporated into Quarks. 
> [~dlaboss] did some initial investigation. The Guava Range impl is dependent 
> on several other Guava classes. Pulling on the thread will pull in a lot of 
> things.  It's not obvious that quarks users will benefit from that "extra 
> baggage". Perhaps starting with the simple, compatible, Range implementation 
> in SensorAnalytics would be a good start. The sample's Range will be tidied 
> up just in case. 
> Moved from https://github.com/quarks-edge/quarks/issues/54



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

Reply via email to