yieldbot/flambo — pull request #31 by jogjayr (2014-11-11 00:40:19+00:00)
Title: Check the type of dstream before doing reduceByKey

If `dstream` is already of type `JavaPairDStream`, there's no need to map identity `PairFunction` over it.

Doing `(.map dstream (pair-function identity))` when `dstream` is of type `JavaPairDStream` causes `untuple` in the next step of the threading macro to not work correctly. The function in `.reduceByKey` is passed a `Tuple2` instead of two params.