mesos/spark — pull request #571 by Reinvigorate (2013-04-16 23:32:11+00:00)
Title: Surfacing decoders on KafkaInputDStream

This pull request allows setting the kafka decoder on kafkaStreams, so that types other than String may be supported. It is a rebasing of https://github.com/mesos/spark/pull/566 to tidy it up.

Using a type other than String causes a ClassCastException. Here is some background on the issue:
https://groups.google.com/forum/?fromgroups=#!searchin/spark-users/vanderborgh/spark-users/pOZ9tOa5yRk/9ofOdkboNqUJ

There are now two kafkaStream methods in StreamingContext:

1. One assumes a DStream[String] and is easy to get up and running with (it's used in the KafkaWordCount example)
2. The other kafkaStream method remains the same but adds a method parameter for the kafka serializer. ie- `ssc.kafkaStream[String, StringDecoder](kafkaParams, topics, storageLevel)`