Running the application
This section assumes that you have already set up the development environment as explained in the Chapter 2, Getting Started with Application Development. All components of the Twitter example can run on the host OS. There is no need for a Hadoop cluster, although it would also be possible to run the Apex application in the Docker container. We will instead run it as a JUnit test, as it is easier to modify and experiment with.
- Check out the code using the following command:
git clone https://github.com/tweise/apex-samples.git
- Then, import the Twitter project into your IDE and run JUnit test:
TwitterStatsAppTest.testApplication
Alternatively, you can run it from the command line:
cd twitter; mvn test -Dtest=TwitterStatsAppTest
By default the test runs the application with a file source of sample tweets (instead of connecting to the Twitter API) and writes results to the console (instead of WebSocket).
- To configure the application for live input and visualization of results...