incubator-s4-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lokesh Shrivastava <lokesh.shrivast...@gmail.com>
Subject Re: 'enents between PE'
Date Sun, 02 Jun 2013 06:54:18 GMT
You can look at MyApp.java in s4-example module. It has 3 levels of PEs
connected to each other using streams.
In that example-
1. User events are generated by GenerateUserEventPE
2. Those user events are then pushed into 3 different streams - Age,
Gender, and User
3.  These 3 streams are input to another set of PEs - UserCount,
GenderCount, and AgeCount
4. These 3 PEs are then connected to PrintPE using one more set of streams
- UserCount, GenderCount, and AgeCount.

Lokesh


On 1 June 2013 01:06, Aboubakr Benabbas <aboubakr.benabbas@tu-ilmenau.de>wrote:

> given the myApp exmaple, can you give me instructions how to add another
> PE to take events from the HelloPE, if it can be modified and what i should
> add to the app
>
>
>
> Matthieu Morel <mmorel@apache.org> schrieb:
>
>
>  On May 30, 2013, at 21:25 , Aboubakr Benabbas wrote:
>
>
>  hi,
>
> I would like to know how can one implement PEs in a way, one PE outputs
> events that are inputs for other PEs
>
>  PEs are connected through streams, and events flow from PE to PE through
> those streams. So when creating the PE graph, just make sure you have
> (down)streams created in PE prototypes and that you use them for building
> the PE graph.
> For instance, in the twitter counter example, the TopicExtractor PE can
> set a down stream:
> https://github.com/apache/incubator-s4/blob/dev/test-apps/twitter-counter/src/main/java/org/apache/s4/example/twitter/TopicExtractorPE.java#L48
>  and the set operation is performed when building the app graph:
> https://github.com/apache/incubator-s4/blob/dev/test-apps/twitter-counter/src/main/java/org/apache/s4/example/twitter/TwitterCounterApp.java#L79
>  Hope this helps,
>  Matthieu
>
>
>

Mime
View raw message