Hi Harold,
Can you include the versions of spark and spark-cassandra-connector you are 
using?

Thanks!

Helena
@helenaedelson

On Oct 30, 2014, at 12:58 PM, Harold Nguyen <har...@nexgate.com> wrote:

> Hi all,
> 
> I'd like to be able to modify values in a DStream, and then send it off to an 
> external source like Cassandra, but I keep getting Serialization errors and 
> am not sure how to use the correct design pattern. I was wondering if you 
> could help me.
> 
> I'd like to be able to do the following:
> 
>  wordCounts.foreachRDD( rdd => {
> 
>        val arr = record.toArray
>        ...
> 
> })
> 
> I would like to use the "arr" to send back to cassandra, for instance:
> 
> Use it like this:
> 
> val collection = sc.parallelize(Seq(a.head._1, a.head_.2))
> collection.saveToCassandra(....)
> 
> Or something like that, but as you know, I can't do this within the 
> "foreacRDD" but only at the driver level. How do I use the "arr" variable to 
> do something like that ?
> 
> Thanks for any help,
> 
> Harold
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to