Hi all,

I'm having trouble troubleshooting this particular block of code for Spark
Streaming and saving to Cassandra:

    val lines = ssc.socketTextStream(args(0), args(1).toInt,
StorageLevel.MEMORY_AND_DISK_SER)
    val words = lines.flatMap(_.split(" "))
    val wordCounts = words.map(x => (x, 1)).reduceByKey(_ + _)

    //-- Writing it to Cassandra
    wordCounts.saveToCassandra("test", "kv", SomeColumns("key", "value"), 1)

Could you tell me where I'm going wrong ? Can I not call
wordCounts.saveToCassandra ?

Here's the error:

Exception in thread "main" java.lang.NoClassDefFoundError:
com/datastax/spark/connector/mapper/ColumnMapper

Thanks,

Harold

Reply via email to