nathanmarz/storm-starter — pull request #27 by miguno (2012-12-07 11:47:07+00:00)
Title: Complete refactoring of the Rolling Count example

Hi Nathan,

as discussed here is the new implementation, see details below.

I have also updated m2-pom.xml and made sure the build and tests execute successfully when run via Maven -- I haven't touched project.clj though.

Of course, the Maven example commands in the README are still working properly. For instance, to run the new Rolling Count example from CLI:

$ mvn -f m2-pom.xml compile exec:java -Dexec.classpathScope=compile -Dexec.mainClass=storm.starter.RollingTopWords

Best,
Michael

----

The new implementation separates the various concerns formerly mixed up in the
example code. Also, we are now using tick tuples (introduced in Storm 0.8)
instead of spawning manual threads for carrying out periodical tasks.

Lastly, we add 192 unit tests for the new implementation that brings the test
coverage for the Rolling Count from 0% to almost 100%.

Note: Adding those unit tests required changes to the build (m2-pom.xml),
notably new test dependencies and moving the existing Java code from src/jvm/*
to src/jvm/main/*. The latter was required so that the test runner triggered
by Maven can tell code (src/jvm/main) and tests (src/jvm/test) apart.