Re: getting firs N messages froma Kafka topic using Spark Streaming

2014-12-03 Thread Hafiz Mujadid
Hi Akhil! Thanks for your response. Can you please suggest me how to return this sample from a function to the caller and stopping SparkStreaming Thanks -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/getting-firs-N-messages-froma-Kafka-topic-using-Spark

Re: getting firs N messages froma Kafka topic using Spark Streaming

2014-12-03 Thread Akhil Das
var msg=itr.next > println(msg) > sample.append(msg) > sample.append("\n") > size -= 1 > } > })) > ssc.start() > ssc.awaitTermination(5000) > ssc.stop(true) > } > > Where sample is a

getting firs N messages froma Kafka topic using Spark Streaming

2014-12-03 Thread Hafiz Mujadid
ssc.awaitTermination(5000) ssc.stop(true) } Where sample is a StringBuilder, when I print the contents of this string builder after getSample method call is returned. I got nothing in it. Any help will be appreciated -- Vi