...
- Download the 0.5.0 release We recommend getting the "source" release and building it, because some dependencies that may not be available on your machine, but are required for the "binary" release.
- or checkout from the Apache git repository, by following the instructions. The 0.5.0 tag corresponds to the current release.
...
- Compile and install S4 in the local maven repository: (you can also let the tests run , which is currently quite long: we're not yet using mockswithout the -DskipTests option)
Code Block S4:incubator-s4$ ./gradlew install -DskipTests .... verbose logs ...
- Build the startup scripts:
Code Block S4:incubator-s4$ ./gradlew s4-tools:installApp .... verbose logs ...:s4-tools:installApp
...
- HelloApp.java: defines a simple application: exposes an input stream ("names"), connected to the HelloPE. See the event dispatch configuration page for more information about how events are dispatched.
Code Block // App parent class provides integration with the S4 platform public class HelloApp extends App { @Override protected void onStart() { } @Override protected void onInit() { // That's where we define PEs and streams // create a prototype HelloPE helloPE = createPE(HelloPE.class); // Create a stream that listens to the "lines" stream and passes events to the helloPE instance. createInputStream("names", new KeyFinder<Event>() { // the KeyFinder is used to identify keys @Override public List<String> get(Event event) { return Arrays.asList(new String[] { event.get("name") }); } }, helloPE); } // skipped remaining methods
...