edgent-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QUARKS-124) Add a recipe for changing the rate at which data is published
Date Tue, 19 Apr 2016 23:17:25 GMT

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

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

Github user ddebrunner commented on a diff in the pull request:

    https://github.com/apache/incubator-quarks/pull/91#discussion_r60328538
  
    --- Diff: analytics/sensors/src/main/java/quarks/analytics/sensors/Deadtime.java ---
    @@ -0,0 +1,98 @@
    +package quarks.analytics.sensors;
    +
    +import java.util.Date;
    +import java.util.Objects;
    +import java.util.concurrent.TimeUnit;
    +
    +import quarks.function.Predicate;
    +
    +/**
    + * A generic "deadtime" {@link Predicate}.
    + * <p>
    + * After accepting a tuple ({@link #test(Object) test()} returns true),
    + * any tuples received during the "deadtime" period are rejected
    + * ({@link #test(Object) test()} returns false).
    + * Then the next tuple is accepted and a new deadtime period begun.
    + * </p><p>
    + * The deadtime period may be changed while the topology is running
    + * via {@link #setPeriod(long, TimeUnit)}.
    + * </p>
    + *
    + * @param <T> tuple type
    + */
    +public class Deadtime<T> implements Predicate<T> {
    +    private static final long serialVersionUID = 1L;
    +    private transient long deadtimePeriod;
    +    private transient TimeUnit deadtimeUnit;
    +    private transient long deadtimePeriodMillis;
    --- End diff --
    
    the same info is being stored twice, it seems to be only for the toString() method, is
it worth it?


> Add a recipe for changing the rate at which data is published
> -------------------------------------------------------------
>
>                 Key: QUARKS-124
>                 URL: https://issues.apache.org/jira/browse/QUARKS-124
>             Project: Quarks
>          Issue Type: Task
>          Components: Documentation
>            Reporter: Dale LaBossiere
>            Assignee: Dale LaBossiere
>
> e.g., analytics are being continuously performed and new results generated say every
1min but under "normal" conditions a "normal" result is only published (equivalently an IotDevice
event generated) every 30min.  Some alert condition is detected by local analytics and the
application wants to start publishing the results every 1min.



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

Mime
View raw message