It is like this. Every event received to the Cassandra CF is associated with a character which uniquely represents the data agent node. Consider these events in a CF, *receiver1* .
Data Agent Timestamp Activity ID A 100 aaa D 103 bbb B 104 aaa C 105 aaa A 106 bbb B 107 bbb There are two Hive scripts associated with this CF, *receiver1*. 1. Periodically runs and creates the list of activities occurred in * receiver1* and stores in the CF, *activities1* . Hive script will be something like this. (syntax may not correct) insert overwrite table activities1 select concat(dataAgent) as ActivityStr, min(timestamp) as StartedTime, max(timestamp) as FinishedTime, ActivityID from receiver1 group by activityId* * The resulting CF, *activities1* will be as follows. ActivityStr StartedTime FinishedTime ActivityID ABC 100 105 aaa DAB 103 107 bbb 2. The next Hive script will be defined/generated based on the user's requirement which contains filters. For example user can filter activities having path "AB". The relevant RegEx will be "*AB*". If the user wants to filter exactly match activities with path "ABC" the RegEx is "ABC". For example if the user wants to count activities failed before the node C, he can get the count difference got between RegEx's "AB" and "ABC". If he wants to know the activities bypassed the step related to node "B", he can get the count difference between RegEx's, "ABC" and "AC". If the user wants to get all the activities passed through the step, "B" he can validate all activities with RegEx, "*B*" and so on. Ultimately the user can find all the activities happened with the proper legal process, which activities have bypassed the proper process and quantitatively analyse them. This KPI, for example can fire e-mail event to the proper authorities when it observed an illegally processed activity. * Maninda Edirisooriya* Software Engineer *WSO2, Inc. *lean.enterprise.middleware. *Blog* : http://maninda.blogspot.com/ *Phone* : +94 777603226 On Wed, Jul 17, 2013 at 8:45 PM, Srinath Perera <[email protected]> wrote: > Could you give an example? > So do we run though Hive once to generate the string pattern and them > process again to match the pattern? > > On the other hand, actually CEP already has grammar to define temporal > conditions, which should work. > > > > On Wed, Jul 17, 2013 at 2:16 PM, Maninda Edirisooriya <[email protected]>wrote: > >> In the proposed BAM KPI modal, Activity is a route from a start node to >> the destination node passing a finite set of nodes. Therefore a path (i.e., >> Activity) can be expressed using a regular grammar. Hive supports regular >> expressions. So if each node can be denoted by a character, first a set of >> activities can be generated and then each activity can be validated using >> the Regular expression. >> * >> Maninda Edirisooriya* >> Software Engineer >> *WSO2, Inc. >> *lean.enterprise.middleware. >> >> *Blog* : http://maninda.blogspot.com/ >> *Phone* : +94 777603226 >> >> _______________________________________________ >> Architecture mailing list >> [email protected] >> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >> >> > > > -- > ============================ > Srinath Perera, Ph.D. > http://people.apache.org/~hemapani/ > http://srinathsview.blogspot.com/ > > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > >
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
