eagle-issues 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] (EAGLE-818) CEP Based Aggregate Framework
Date Sat, 03 Dec 2016 15:23:58 GMT

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

ASF GitHub Bot commented on EAGLE-818:
--------------------------------------

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

    https://github.com/apache/incubator-eagle/pull/709#discussion_r90759169
  
    --- Diff: eagle-core/eagle-app/eagle-app-base/src/test/java/org/apache/eagle/app/stream/CEPFunctionTest.java
---
    @@ -29,22 +30,31 @@
         public void testSiddhiFunction() {
             CEPFunction function = new CEPFunction(
                 "define stream inputStream (name string, value double);\n "
    -                + "from inputStream#window.timeBatch( 1 min ) \n" +
    +                + "from inputStream#window.timeBatch( 10 sec ) \n" +
                     "select name, avg(value) as avgValue\n" +
                     "group by name \n" +
                     "insert into outputStream ",
                 "inputStream","outputStream");
             Collector collector = new Collector() {
                 @Override
                 public void collect(Object key, Map event) {
    -
    +                Assert.assertTrue(Double.valueOf(event.get("avgValue").toString()) ==
0.97);
                 }
             };
             function.open(collector);
             function.transform(new HashMap<String,Object>() {{
                 put("name","cpu.usage");
                 put("value", 0.98);
             }});
    +        function.transform(new HashMap<String,Object>() {{
    +            put("name","cpu.usage");
    +            put("value", 0.96);
    +        }});
    +        try {
    +            Thread.sleep(60000);
    --- End diff --
    
    Avoid use sleep in unit test especially,here sleep for `60s`, learn to use `Semaphore`
for *async unit test case*


> CEP Based Aggregate Framework
> -----------------------------
>
>                 Key: EAGLE-818
>                 URL: https://issues.apache.org/jira/browse/EAGLE-818
>             Project: Eagle
>          Issue Type: Improvement
>    Affects Versions: v0.5.0
>            Reporter: Zhao, Qingwen
>            Assignee: Zhao, Qingwen
>             Fix For: v0.5.0
>
>
> Implementation of CEP based aggregate framework 



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

Mime
View raw message