Re: createDirectStream with offsets

2016-05-07 Thread Eric Friedman
Thanks Cody. It turns out that there was an even simpler explanation (the flaw you pointed out was accurate too). I had mutable.Map instances being passed where KafkaUtils wants immutable ones. On Fri, May 6, 2016 at 8:32 AM, Cody Koeninger wrote: > Look carefully at the

Re: createDirectStream with offsets

2016-05-06 Thread Cody Koeninger
Look carefully at the error message, the types you're passing in don't match. For instance, you're passing in a message handler that returns a tuple, but the rdd return type you're specifying (the 5th type argument) is just String. On Fri, May 6, 2016 at 9:49 AM, Eric Friedman

Re: createDirectStream with offsets

2016-05-06 Thread Eric Friedman
My build dependencies: compile 'org.scala-lang:scala-library:2.10.4' compile 'org.apache.spark:spark-core_2.10:1.6.1' compile 'org.apache.spark:spark-sql_2.10:1.6.1' compile 'org.apache.spark:spark-hive_2.10:1.6.1' compile

createDirectStream with offsets

2016-05-06 Thread Eric Friedman
Hello, I've been using createDirectStream with Kafka and now need to switch to the version of that API that lets me supply offsets for my topics. I'm unable to get this to compile for some reason, even if I lift the very same usage from the Spark test suite. I'm calling it like this: val